@@ -31,7 +31,7 @@ |
||
31 | 31 | 'xs' => '200x200', |
32 | 32 | ], |
33 | 33 | 'events' => [ |
34 | - 'created','updated','deleted' |
|
34 | + 'created', 'updated', 'deleted' |
|
35 | 35 | ], |
36 | 36 | 'seed_rows' => 25, |
37 | 37 | 'listing_per_page' => 20, |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $bar->setOverwrite(true); |
55 | 55 | $bar->start(); |
56 | 56 | $fs = new FileSystem(); |
57 | - foreach ($this->filesToPublish as $src ) { |
|
57 | + foreach ($this->filesToPublish as $src) { |
|
58 | 58 | $fs->clone($src, '/'); |
59 | 59 | } |
60 | 60 | |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $this->line("\n"); |
78 | 78 | |
79 | 79 | foreach ($generatedFiles as $key => $file) { |
80 | - \Log::info("Generated file: " . str_replace(base_path() . "\\", "", $file)); |
|
80 | + \Log::info("Generated file: ".str_replace(base_path()."\\", "", $file)); |
|
81 | 81 | } |
82 | - $this->info( (isset($key) ? ++$key : 0) . " files generated. Check log for details."); |
|
82 | + $this->info((isset($key) ? ++$key : 0)." files generated. Check log for details."); |
|
83 | 83 | $this->info("Cheers!!!"); |
84 | 84 | } |
85 | 85 | } |
@@ -24,15 +24,15 @@ |
||
24 | 24 | */ |
25 | 25 | public function handle() |
26 | 26 | { |
27 | - copy(__DIR__ . '/../../src/resources/stubs/RouteServiceProvider.stub', app_path('Providers/LaragenRouteServiceProvider.php')); |
|
27 | + copy(__DIR__.'/../../src/resources/stubs/RouteServiceProvider.stub', app_path('Providers/LaragenRouteServiceProvider.php')); |
|
28 | 28 | if (!is_dir('routes/backend')) { |
29 | 29 | @mkdir(base_path('routes/backend'), 0777, true); |
30 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php')); |
|
31 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php')); |
|
30 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php')); |
|
31 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php')); |
|
32 | 32 | } |
33 | 33 | if (!is_dir('routes/frontend')) { |
34 | 34 | @mkdir(base_path('routes/frontend'), 0777, true); |
35 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php')); |
|
35 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php')); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $this->app->register(ImageServiceProvider::class); |
51 | 51 | AliasLoader::getInstance()->alias('Image', Image::class); |
52 | 52 | |
53 | - $this->app->singleton('laragen', function () { |
|
53 | + $this->app->singleton('laragen', function() { |
|
54 | 54 | return LaragenOptions::getInstance(); |
55 | 55 | }); |
56 | 56 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('notifications', function (Blueprint $table) { |
|
16 | + Schema::create('notifications', function(Blueprint $table) { |
|
17 | 17 | $table->uuid('id')->primary(); |
18 | 18 | $table->string('type'); |
19 | 19 | $table->morphs('notifiable'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('failed_jobs', function (Blueprint $table) { |
|
16 | + Schema::create('failed_jobs', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->text('connection'); |
19 | 19 | $table->text('queue'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('jobs', function (Blueprint $table) { |
|
16 | + Schema::create('jobs', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('queue')->index(); |
19 | 19 | $table->longText('payload'); |
@@ -8,14 +8,14 @@ |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::table('users', function (Blueprint $table) { |
|
11 | + Schema::table('users', function(Blueprint $table) { |
|
12 | 12 | $table->string('api_token', 60)->unique()->nullable(); |
13 | 13 | }); |
14 | 14 | } |
15 | 15 | |
16 | 16 | public function down() |
17 | 17 | { |
18 | - Schema::table('users', function (Blueprint $table) { |
|
18 | + Schema::table('users', function(Blueprint $table) { |
|
19 | 19 | $table->dropColumn(['api_token']); |
20 | 20 | }); |
21 | 21 | } |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | { |
13 | 13 | public function __construct() |
14 | 14 | { |
15 | - $this->middleware(function ($request, $next) { |
|
16 | - if(!auth()->user()->getRoleNames()->contains('super-admin')) |
|
15 | + $this->middleware(function($request, $next) { |
|
16 | + if (!auth()->user()->getRoleNames()->contains('super-admin')) |
|
17 | 17 | abort(403, 'Access denied'); |
18 | 18 | return $next($request); |
19 | 19 | }); |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | { |
40 | 40 | return view('backend.roles.edit', [ |
41 | 41 | 'role' => $role, |
42 | - 'groupedPermissions' => Permission::all('name', 'id')->map(function ($perm) { |
|
42 | + 'groupedPermissions' => Permission::all('name', 'id')->map(function($perm) { |
|
43 | 43 | $perm->name = str_replace('_', ' ', $perm->name); |
44 | 44 | return $perm; |
45 | - })->groupBy(function ($perm) { |
|
45 | + })->groupBy(function($perm) { |
|
46 | 46 | foreach (array_keys(app('laragen')->getModules()) as $module) { |
47 | - if(Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
47 | + if (Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
48 | 48 | return Str::title(str_replace('_', ' ', $module)); |
49 | 49 | } |
50 | 50 | return "Others"; |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | public function create() |
59 | 59 | { |
60 | 60 | return view('backend.roles.create', [ |
61 | - 'groupedPermissions' => Permission::all('name', 'id')->map(function ($perm) { |
|
61 | + 'groupedPermissions' => Permission::all('name', 'id')->map(function($perm) { |
|
62 | 62 | $perm->name = str_replace('_', ' ', $perm->name); |
63 | 63 | return $perm; |
64 | - })->groupBy(function ($perm) { |
|
64 | + })->groupBy(function($perm) { |
|
65 | 65 | foreach (array_keys(app('laragen')->getModules()) as $module) { |
66 | - if(Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
66 | + if (Str::contains($perm->name, str_replace('_', ' ', $module))) |
|
67 | 67 | return Str::title(str_replace('_', ' ', $module)); |
68 | 68 | } |
69 | 69 | return "Others"; |