@@ -1,41 +1,41 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | return [ |
| 3 | - 'items_to_generate' => [ |
|
| 4 | - 'Common' => [ |
|
| 5 | - 'Migration', |
|
| 6 | - 'Model', |
|
| 7 | - 'Seeder', |
|
| 8 | - 'Route' |
|
| 9 | - ], |
|
| 10 | - 'Frontend' => [ |
|
| 11 | - 'Controller', |
|
| 12 | - ], |
|
| 13 | - 'Backend' => [ |
|
| 14 | - 'Controller', |
|
| 15 | - 'Api', |
|
| 16 | - 'Request', |
|
| 17 | - 'View', |
|
| 18 | - 'Notification', |
|
| 19 | - 'Observer' |
|
| 20 | - ] |
|
| 21 | - ], |
|
| 22 | - 'files_to_publish' => [ |
|
| 3 | + 'items_to_generate' => [ |
|
| 4 | + 'Common' => [ |
|
| 5 | + 'Migration', |
|
| 6 | + 'Model', |
|
| 7 | + 'Seeder', |
|
| 8 | + 'Route' |
|
| 9 | + ], |
|
| 10 | + 'Frontend' => [ |
|
| 11 | + 'Controller', |
|
| 12 | + ], |
|
| 13 | + 'Backend' => [ |
|
| 14 | + 'Controller', |
|
| 15 | + 'Api', |
|
| 16 | + 'Request', |
|
| 17 | + 'View', |
|
| 18 | + 'Notification', |
|
| 19 | + 'Observer' |
|
| 20 | + ] |
|
| 21 | + ], |
|
| 22 | + 'files_to_publish' => [ |
|
| 23 | 23 | 'public', |
| 24 | 24 | 'app', |
| 25 | 25 | 'database', |
| 26 | 26 | 'resources', |
| 27 | - ], |
|
| 28 | - 'image_sizes' => [ |
|
| 29 | - 'sm' => '500x500', |
|
| 30 | - 'md' => '800x800', |
|
| 31 | - 'xs' => '200x200', |
|
| 32 | - ], |
|
| 33 | - 'events' => [ |
|
| 34 | - 'created','updated','deleted' |
|
| 35 | - ], |
|
| 36 | - 'seed_rows' => 25, |
|
| 37 | - 'listing_per_page' => 20, |
|
| 38 | - 'generic_fields' => true, |
|
| 39 | - 'seo_fields' => true, |
|
| 40 | - 'user_model' => 'App\User' |
|
| 27 | + ], |
|
| 28 | + 'image_sizes' => [ |
|
| 29 | + 'sm' => '500x500', |
|
| 30 | + 'md' => '800x800', |
|
| 31 | + 'xs' => '200x200', |
|
| 32 | + ], |
|
| 33 | + 'events' => [ |
|
| 34 | + 'created','updated','deleted' |
|
| 35 | + ], |
|
| 36 | + 'seed_rows' => 25, |
|
| 37 | + 'listing_per_page' => 20, |
|
| 38 | + 'generic_fields' => true, |
|
| 39 | + 'seo_fields' => true, |
|
| 40 | + 'user_model' => 'App\User' |
|
| 41 | 41 | ]; |
| 42 | 42 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | '--provider' => 'Prateekkarki\Laragen\LaragenServiceProvider' |
| 31 | 31 | ]); |
| 32 | 32 | |
| 33 | - Artisan::call('vendor:publish', [ |
|
| 33 | + Artisan::call('vendor:publish', [ |
|
| 34 | 34 | '--provider' => 'Spatie\Permission\PermissionServiceProvider' |
| 35 | 35 | ]); |
| 36 | 36 | |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AlterUsersTable extends Migration |
| 8 | 8 | { |
| 9 | - public function up() |
|
| 10 | - { |
|
| 11 | - Schema::table('users', function (Blueprint $table) { |
|
| 12 | - $table->string('api_token', 60)->unique()->nullable(); |
|
| 13 | - }); |
|
| 14 | - } |
|
| 9 | + public function up() |
|
| 10 | + { |
|
| 11 | + Schema::table('users', function (Blueprint $table) { |
|
| 12 | + $table->string('api_token', 60)->unique()->nullable(); |
|
| 13 | + }); |
|
| 14 | + } |
|
| 15 | 15 | |
| 16 | - public function down() |
|
| 17 | - { |
|
| 18 | - Schema::table('users', function (Blueprint $table) { |
|
| 19 | - $table->dropColumn(['api_token']); |
|
| 20 | - }); |
|
| 21 | - } |
|
| 16 | + public function down() |
|
| 17 | + { |
|
| 18 | + Schema::table('users', function (Blueprint $table) { |
|
| 19 | + $table->dropColumn(['api_token']); |
|
| 20 | + }); |
|
| 21 | + } |
|
| 22 | 22 | } |
@@ -14,18 +14,18 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function run() |
| 16 | 16 | { |
| 17 | - $email = '[email protected]'; |
|
| 18 | - $pass = Hash::make('password'); |
|
| 17 | + $email = '[email protected]'; |
|
| 18 | + $pass = Hash::make('password'); |
|
| 19 | 19 | |
| 20 | - $user = User::where('email', '=', $email)->first(); |
|
| 21 | - if ($user === null) { |
|
| 22 | - $user = new App\User(); |
|
| 23 | - $user->password = $pass; |
|
| 24 | - $user->email = $email; |
|
| 25 | - $user->email_verified_at = now(); |
|
| 26 | - $user->remember_token = Str::random(10); |
|
| 27 | - $user->name = 'Admin User'; |
|
| 28 | - $user->save(); |
|
| 29 | - } |
|
| 20 | + $user = User::where('email', '=', $email)->first(); |
|
| 21 | + if ($user === null) { |
|
| 22 | + $user = new App\User(); |
|
| 23 | + $user->password = $pass; |
|
| 24 | + $user->email = $email; |
|
| 25 | + $user->email_verified_at = now(); |
|
| 26 | + $user->remember_token = Str::random(10); |
|
| 27 | + $user->name = 'Admin User'; |
|
| 28 | + $user->save(); |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | class User extends Authenticatable |
| 10 | 10 | { |
| 11 | - use HasRoles; |
|
| 11 | + use HasRoles; |
|
| 12 | 12 | use Notifiable; |
| 13 | 13 | |
| 14 | 14 | /** |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, |
| 61 | 61 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, |
| 62 | 62 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, |
| 63 | - 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, |
|
| 64 | - 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, |
|
| 65 | - 'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class, |
|
| 66 | - 'jwt.verify' => \App\Http\Middleware\JwtMiddleware::class, |
|
| 67 | - ]; |
|
| 63 | + 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, |
|
| 64 | + 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, |
|
| 65 | + 'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class, |
|
| 66 | + 'jwt.verify' => \App\Http\Middleware\JwtMiddleware::class, |
|
| 67 | + ]; |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * The priority-sorted list of middleware. |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | |
| 4 | 4 | class FileType extends LaragenType |
| 5 | 5 | {
|
| 6 | - protected $dataType = 'string'; |
|
| 7 | - protected $formType = 'file'; |
|
| 8 | - protected $extensions = '.png,.jpg,.gif,.bmp,.jpeg'; |
|
| 6 | + protected $dataType = 'string'; |
|
| 7 | + protected $formType = 'file'; |
|
| 8 | + protected $extensions = '.png,.jpg,.gif,.bmp,.jpeg'; |
|
| 9 | 9 | protected $relationalType = false; |
| 10 | 10 | } |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | class DateTimeType extends GeneralType |
| 6 | 6 | {
|
| 7 | - protected $dataType = 'datetime'; |
|
| 8 | - protected $formType = 'datetime'; |
|
| 9 | - protected $size = false; |
|
| 10 | - protected $validationRule = 'date_format:Y-m-d H:i:s'; |
|
| 7 | + protected $dataType = 'datetime'; |
|
| 8 | + protected $formType = 'datetime'; |
|
| 9 | + protected $size = false; |
|
| 10 | + protected $validationRule = 'date_format:Y-m-d H:i:s'; |
|
| 11 | 11 | } |
@@ -4,6 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | class StringType extends GeneralType |
| 6 | 6 | {
|
| 7 | - protected $dataType = 'string'; |
|
| 8 | - protected $formType = 'string'; |
|
| 7 | + protected $dataType = 'string'; |
|
| 8 | + protected $formType = 'string'; |
|
| 9 | 9 | } |