-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 561c90b
Showing
6,301 changed files
with
1,104,164 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
APP_ENV=local | ||
APP_DEBUG=true | ||
APP_KEY=SomeRandomString | ||
|
||
DB_HOST=localhost | ||
DB_DATABASE=homestead | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
|
||
CACHE_DRIVER=file | ||
SESSION_DRIVER=file | ||
QUEUE_DRIVER=sync | ||
|
||
MAIL_DRIVER=smtp | ||
MAIL_HOST=mailtrap.io | ||
MAIL_PORT=2525 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text=auto | ||
*.css linguist-vendored | ||
*.less linguist-vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/vendor | ||
/node_modules | ||
.env | ||
composer.lock | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Thank you | ||
|
||
Thanks for purchasing Josh admin theme | ||
|
||
We are sure you will Enjoy using it! | ||
|
||
# Installation | ||
|
||
Git repo installation is a bit different than the original one because here all files copied already and everything is configured properly | ||
|
||
infact this will take less time compared to installing from CodeCanyon's files | ||
|
||
##### add vendors | ||
we don't push vendors to git as they can grow like anything (a default feature of laravel or any composer related projects) | ||
|
||
````composer install```` | ||
|
||
#### create .env file | ||
Since .env file is gitignored, we need to create that (again a security measure of not to expose your database details to anyone else) | ||
|
||
````cp .env.example .env```` | ||
|
||
#### generate key | ||
|
||
Every app needs a key which is being used for many purposes including salting your passwords | ||
|
||
```` php artisan key:generate ```` | ||
|
||
#### database credentials | ||
|
||
open ````.env```` and modify database details with yours | ||
|
||
#### add tables to databaes | ||
|
||
```` php artisan migrate ```` | ||
|
||
#### add admin to users table | ||
|
||
```` php artisan db:seed ```` | ||
|
||
# Congratulations | ||
open your website and now it should be fully working :) | ||
|
||
*** | ||
|
||
# Bugs | ||
|
||
To report bugs, please click on "Issues" in left menu and check if the bug is reported already and if it doesn't exists please create new issue by clicking **create issue** | ||
|
||
# pull requests | ||
|
||
If you would like to improve code :) or fix any bug or add new feature, | ||
|
||
please send a pull request and we will be thankful to you for your work! :D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
use Cviebrock\EloquentSluggable\SluggableInterface; | ||
use Cviebrock\EloquentSluggable\SluggableTrait; | ||
use Cviebrock\EloquentTaggable\Contracts\Taggable; | ||
use Cviebrock\EloquentTaggable\Traits\Taggable as TaggableImpl; | ||
|
||
class Blog extends Model implements SluggableInterface, Taggable { | ||
|
||
use SoftDeletes; | ||
use SluggableTrait; | ||
use TaggableImpl; | ||
|
||
protected $dates = ['deleted_at']; | ||
|
||
protected $sluggable = [ | ||
'build_from' => 'title', | ||
'save_to' => 'slug', | ||
]; | ||
|
||
protected $table = 'blogs'; | ||
|
||
protected $guarded = array('id'); | ||
|
||
public function comments() | ||
{ | ||
return $this->hasMany('App\BlogComment'); | ||
} | ||
public function category() | ||
{ | ||
return $this->belongsTo('App\BlogCategory'); | ||
} | ||
public function author() | ||
{ | ||
return $this->belongsTo('App\User', 'user_id'); | ||
} | ||
public function getBlogcategoryAttribute() | ||
{ | ||
return $this->category->lists('id'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class BlogCategory extends Model { | ||
|
||
use SoftDeletes; | ||
|
||
protected $dates = ['deleted_at']; | ||
|
||
protected $table = 'blog_categories'; | ||
|
||
protected $guarded = array('id'); | ||
|
||
public function blog() | ||
{ | ||
return $this->hasMany('App\Blog'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class BlogComment extends Model { | ||
|
||
use SoftDeletes; | ||
|
||
protected $dates = ['deleted_at']; | ||
|
||
protected $table = 'blog_comments'; | ||
|
||
protected $guarded = array('id'); | ||
|
||
public function blog() | ||
{ | ||
return $this->belongsTo('App\Blog'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Foundation\Inspiring; | ||
|
||
class Inspire extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'inspire'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Display an inspiring quote'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
|
||
class JoshCrudCommand extends Command { | ||
|
||
/** | ||
* The console command name. | ||
* | ||
* @var string | ||
*/ | ||
protected $name = 'crud:generate'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Crud Generator including controller, model, view'; | ||
|
||
/** | ||
* Create a new command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function fire() | ||
{ | ||
$name = ucwords(strtolower($this->argument('name'))); | ||
if( $this->option('fields') ) { | ||
$fields = $this->option('fields'); | ||
|
||
$fillable_array = explode(',', $fields); | ||
foreach ($fillable_array as $value) { | ||
$data[] = preg_replace("/(.*?):(.*)/", "$1", trim($value)); | ||
} | ||
|
||
$comma_separeted_str = implode("', '", $data); | ||
$fillable = "['"; | ||
$fillable .= $comma_separeted_str; | ||
$fillable .= "']"; | ||
|
||
$this->call('crud:controller', ['name' => str_plural($name) . 'Controller', '--crud-name' => $name]); | ||
$this->call('crud:model', ['name' => str_singular($name), '--fillable' => $fillable]); | ||
$this->call('crud:migration', ['name' => str_plural(strtolower($name)), '--schema' => $fields]); | ||
$this->call('crud:view', ['name' => $name, '--fields' => $fields]); | ||
|
||
//add CrudName to left menu | ||
$this->call('crud:menu',['name' => $name]); | ||
|
||
//append crudName to routes.php | ||
$this->call('crud:route',['name' => $name]); | ||
} else { | ||
$this->call('make:controller', ['name' => $name.'Controller']); | ||
$this->call('make:model', ['name' => $name]); | ||
} | ||
// Commit Database migration | ||
$this->call('migrate'); | ||
} | ||
|
||
/** | ||
* Get the console command arguments. | ||
* | ||
* @return array | ||
*/ | ||
protected function getArguments() | ||
{ | ||
return [ | ||
['name', InputArgument::REQUIRED, 'Name of the Crud.'], | ||
]; | ||
} | ||
|
||
/* | ||
* Get the console command options. | ||
* | ||
* @return array | ||
*/ | ||
|
||
protected function getOptions() | ||
{ | ||
return [ | ||
['fields', null, InputOption::VALUE_OPTIONAL, 'Fields of form & model.', null], | ||
]; | ||
} | ||
|
||
} |
Oops, something went wrong.