@@ -15,12 +15,12 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function boot() |
| 17 | 17 | { |
| 18 | - if(!$this->app->routesAreCached()){ |
|
| 19 | - require __DIR__.'/routes.php'; |
|
| 18 | + if (!$this->app->routesAreCached()) { |
|
| 19 | + require __DIR__ . '/routes.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | // $this->loadViewsFrom(base_path('resources/views/'), 'advancetrust'); |
| 23 | - $this->loadViewsFrom(__DIR__.'/Views/', 'advancetrust'); |
|
| 23 | + $this->loadViewsFrom(__DIR__ . '/Views/', 'advancetrust'); |
|
| 24 | 24 | // $this->publishes([ |
| 25 | 25 | // __DIR__.'/Controllers' => app_path('Http/Controllers/') |
| 26 | 26 | // ],'advancetrust'); |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | $prefix = $this->argument('prefix'); |
| 51 | 51 | $middleware = $this->argument('middleware'); |
| 52 | 52 | |
| 53 | - $replace_prefix = str_replace('[%_prefix%]',$prefix,File::get(__DIR__.'/../stubs/routes.stub')); |
|
| 53 | + $replace_prefix = str_replace('[%_prefix%]', $prefix, File::get(__DIR__ . '/../stubs/routes.stub')); |
|
| 54 | 54 | |
| 55 | - $replace_middleware = str_replace('[%_middleware%]',$middleware,$replace_prefix); |
|
| 55 | + $replace_middleware = str_replace('[%_middleware%]', $middleware, $replace_prefix); |
|
| 56 | 56 | |
| 57 | 57 | return $replace_middleware; |
| 58 | 58 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | public function handle() |
| 62 | 62 | { |
| 63 | 63 | $this->info('Route add success'); |
| 64 | - File::append(base_path('routes/web.php'),"\n".$this->content()); |
|
| 65 | - File::append(base_path('routes/api.php'),"\n".File::get(__DIR__.'/../stubs/api.stub')); |
|
| 64 | + File::append(base_path('routes/web.php'), "\n" . $this->content()); |
|
| 65 | + File::append(base_path('routes/api.php'), "\n" . File::get(__DIR__ . '/../stubs/api.stub')); |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -33,8 +33,8 @@ |
||
| 33 | 33 | |
| 34 | 34 | protected function getComposerVal() |
| 35 | 35 | { |
| 36 | - $composer = json_decode(File::get(base_path('composer.json')),true); |
|
| 37 | - return $composer['require']['bantenprov/advancetrust']; |
|
| 36 | + $composer = json_decode(File::get(base_path('composer.json')),true); |
|
| 37 | + return $composer['require']['bantenprov/advancetrust']; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | protected function getComposerVal() |
| 35 | 35 | { |
| 36 | - $composer = json_decode(File::get(base_path('composer.json')),true); |
|
| 36 | + $composer = json_decode(File::get(base_path('composer.json')), true); |
|
| 37 | 37 | return $composer['require']['bantenprov/advancetrust']; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $this->info('================='); |
| 51 | 51 | $this->info('Author : Bantenprov'); |
| 52 | 52 | $this->info('Support Laravel > 5.4.* '); |
| 53 | - $this->info('Version : '.$version); |
|
| 53 | + $this->info('Version : ' . $version); |
|
| 54 | 54 | $this->info('================='); |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | protected function controllerViewCreate() |
| 56 | 56 | { |
| 57 | 57 | |
| 58 | - foreach($this->stubsController['controllers'] as $stub) |
|
| 58 | + foreach ($this->stubsController['controllers'] as $stub) |
|
| 59 | 59 | { |
| 60 | - File::put(base_path('app/Http/Controllers/').str_replace('stub','php',$stub),File::get(__DIR__.'/../stubs/Controllers/'.$stub)); |
|
| 60 | + File::put(base_path('app/Http/Controllers/') . str_replace('stub', 'php', $stub), File::get(__DIR__ . '/../stubs/Controllers/' . $stub)); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | } |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | protected function controllerApiCreate() |
| 66 | 66 | { |
| 67 | 67 | |
| 68 | - foreach($this->stubsApiController['controllersapi'] as $stub) |
|
| 68 | + foreach ($this->stubsApiController['controllersapi'] as $stub) |
|
| 69 | 69 | { |
| 70 | - File::put(base_path('app/Http/Controllers/').str_replace('stub','php',$stub),File::get(__DIR__.'/../stubs/Controllers/api/'.$stub)); |
|
| 70 | + File::put(base_path('app/Http/Controllers/') . str_replace('stub', 'php', $stub), File::get(__DIR__ . '/../stubs/Controllers/api/' . $stub)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | } |