@@ -24,15 +24,15 @@ discard block |
||
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 | try { |
30 | 30 | mkdir(base_path('routes/backend'), 0777, true); |
31 | 31 | } catch (\Exception $e) { |
32 | 32 | exit("Couldn't make directory. Make sure you have right permissions."); |
33 | 33 | } |
34 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php')); |
|
35 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php')); |
|
34 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/web.php')); |
|
35 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/backend/auth.php')); |
|
36 | 36 | } |
37 | 37 | if (!is_dir('routes/frontend')) { |
38 | 38 | try { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } catch (\Exception $e) { |
41 | 41 | exit("Couldn't make directory. Make sure you have right permissions."); |
42 | 42 | } |
43 | - copy(__DIR__ . '/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php')); |
|
43 | + copy(__DIR__.'/../../src/resources/stubs/Route.stub', base_path('routes/frontend/web.php')); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | class Notification extends BaseGenerator implements GeneratorInterface |
10 | 10 | { |
11 | 11 | private static $destination = "laragen/app/Notifications"; |
12 | - private static $namespace = "Laragen\App\Notifications"; |
|
12 | + private static $namespace = "Laragen\App\Notifications"; |
|
13 | 13 | private static $template = "backend/notifications/notification"; |
14 | 14 | |
15 | 15 | public function generate() |
@@ -210,7 +210,7 @@ |
||
210 | 210 | $this->insertIntoFile( |
211 | 211 | $laragenSeederFile, |
212 | 212 | "\n // End factories", |
213 | - "\n".$this->getTabs(2)."factory(".$type->getPivot()."::class, " . ((int) config('laragen.options.seed_rows') * 2) . ")->create();", |
|
213 | + "\n".$this->getTabs(2)."factory(".$type->getPivot()."::class, ".((int) config('laragen.options.seed_rows') * 2).")->create();", |
|
214 | 214 | false |
215 | 215 | ); |
216 | 216 | } |
@@ -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 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | protected function redirectTo($request) |
16 | 16 | { |
17 | - if (! $request->expectsJson()) { |
|
17 | + if (!$request->expectsJson()) { |
|
18 | 18 | return route('backend.login'); |
19 | 19 | } |
20 | 20 | } |
@@ -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, |
@@ -47,16 +47,16 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | function deleteFiles($target) { |
50 | - if(is_dir($target)){ |
|
51 | - $files = glob( $target . '*', GLOB_MARK ); |
|
50 | + if (is_dir($target)) { |
|
51 | + $files = glob($target.'*', GLOB_MARK); |
|
52 | 52 | |
53 | - foreach( $files as $file ){ |
|
54 | - deleteFiles( $file ); |
|
53 | + foreach ($files as $file) { |
|
54 | + deleteFiles($file); |
|
55 | 55 | } |
56 | 56 | |
57 | - rmdir( $target ); |
|
58 | - } elseif(is_file($target)) { |
|
59 | - unlink( $target ); |
|
57 | + rmdir($target); |
|
58 | + } elseif (is_file($target)) { |
|
59 | + unlink($target); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | class Model extends BaseGenerator implements GeneratorInterface |
9 | 9 | { |
10 | 10 | private static $destination = "laragen/app/Models"; |
11 | - private static $namespace = "Laragen\App\Models"; |
|
11 | + private static $namespace = "Laragen\App\Models"; |
|
12 | 12 | private static $template = "common/Models/Model"; |
13 | 13 | private static $pivotTemplate = "common/Models/Pivot"; |
14 | 14 |
@@ -9,8 +9,8 @@ |
||
9 | 9 | class Request extends BaseGenerator implements GeneratorInterface |
10 | 10 | { |
11 | 11 | private static $destination = "laragen/app/Http/Requests/Backend"; |
12 | - private static $namespace = "Laragen\App\Http\Requests\Backend"; |
|
13 | - private static $template = "backend/Request"; |
|
12 | + private static $namespace = "Laragen\App\Http\Requests\Backend"; |
|
13 | + private static $template = "backend/Request"; |
|
14 | 14 | |
15 | 15 | public function generate() |
16 | 16 | { |