@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | if ($this->app->runningInConsole()) { |
29 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class]); |
|
30 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class]); |
|
31 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class]); |
|
32 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class]); |
|
33 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class]); |
|
34 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class]); |
|
35 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class]); |
|
36 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeView::class]); |
|
37 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class]); |
|
38 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class]); |
|
39 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTERoute::class]); |
|
40 | - $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTERouteAlt::class]); |
|
29 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class ]); |
|
30 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class ]); |
|
31 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class ]); |
|
32 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class ]); |
|
33 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class ]); |
|
34 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class ]); |
|
35 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class ]); |
|
36 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\MakeView::class ]); |
|
37 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class ]); |
|
38 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class ]); |
|
39 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTERoute::class ]); |
|
40 | + $this->commands([ \Acacha\AdminLTETemplateLaravel\Console\AdminLTERouteAlt::class ]); |
|
41 | 41 | } |
42 | 42 | |
43 | - $this->app->bind('AdminLTE', function () { |
|
43 | + $this->app->bind('AdminLTE', function() { |
|
44 | 44 | return new \Acacha\AdminLTETemplateLaravel\AdminLTE(); |
45 | 45 | }); |
46 | 46 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if (!$this->app->routesAreCached()) { |
104 | 104 | $router = app('router'); |
105 | 105 | |
106 | - $router->group(['namespace' => $this->getAppNamespace().'Http\Controllers'], function () { |
|
106 | + $router->group([ 'namespace' => $this->getAppNamespace().'Http\Controllers' ], function() { |
|
107 | 107 | require __DIR__.'/../Http/routes.php'; |
108 | 108 | }); |
109 | 109 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | protected function getStubPath() |
33 | 33 | { |
34 | - return __DIR__ . '/../stubs/route.stub'; |
|
34 | + return __DIR__.'/../stubs/route.stub'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | protected function obtainReplacements() |
41 | 41 | { |
42 | 42 | return [ |
43 | - 'ROUTE_LINK' => $this->getReplacements()[0], |
|
44 | - 'ROUTE_VIEW' => $this->getReplacements()[1], |
|
45 | - 'ROUTE_METHOD' => $this->getReplacements()[2], |
|
43 | + 'ROUTE_LINK' => $this->getReplacements()[ 0 ], |
|
44 | + 'ROUTE_VIEW' => $this->getReplacements()[ 1 ], |
|
45 | + 'ROUTE_METHOD' => $this->getReplacements()[ 2 ], |
|
46 | 46 | ]; |
47 | 47 | } |
48 | 48 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function getStubPath() |
34 | 34 | { |
35 | - return __DIR__ . '/../stubs/route_with_resource_controller.stub'; |
|
35 | + return __DIR__.'/../stubs/route_with_resource_controller.stub'; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | protected function obtainReplacements() |
44 | 44 | { |
45 | 45 | return [ |
46 | - 'ROUTE_LINK' => $this->getReplacements()[0], |
|
47 | - 'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[1]), |
|
46 | + 'ROUTE_LINK' => $this->getReplacements()[ 0 ], |
|
47 | + 'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[ 1 ]), |
|
48 | 48 | ]; |
49 | 49 | } |
50 | 50 | } |
@@ -11,11 +11,11 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | |
14 | -Route::get('/', function () { |
|
14 | +Route::get('/', function() { |
|
15 | 15 | return view('welcome'); |
16 | 16 | }); |
17 | 17 | |
18 | -Route::group(['middleware' => 'auth'], function () { |
|
18 | +Route::group([ 'middleware' => 'auth' ], function() { |
|
19 | 19 | // Route::get('/link1', function () { |
20 | 20 | // // Uses Auth Middleware |
21 | 21 | // }); |
@@ -13,11 +13,11 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -Route::get('/user', function (Request $request) { |
|
16 | +Route::get('/user', function(Request $request) { |
|
17 | 17 | return $request->user(); |
18 | 18 | })->middleware('auth:api'); |
19 | 19 | |
20 | -Route::group(['prefix' => 'v1','middleware' => 'auth:api'], function () { |
|
20 | +Route::group([ 'prefix' => 'v1', 'middleware' => 'auth:api' ], function() { |
|
21 | 21 | // Route::resource('task', 'TasksController'); |
22 | 22 | |
23 | 23 | //Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly. |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | if (str_contains($controllername, '@')) { |
24 | 24 | return ucfirst(preg_quote($controllername)); |
25 | 25 | } |
26 | - return ucfirst(preg_quote($controllername) . '@index'); |
|
26 | + return ucfirst(preg_quote($controllername).'@index'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | protected function controllerMethod($controllername) |
50 | 50 | { |
51 | 51 | if (str_contains($controller = $controllername, '@')) { |
52 | - return substr($controllername, strpos($controllername, '@')+1, strlen($controllername)); |
|
52 | + return substr($controllername, strpos($controllername, '@') + 1, strlen($controllername)); |
|
53 | 53 | } |
54 | 54 | return 'index'; |
55 | 55 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function getStubPath() |
34 | 34 | { |
35 | - return __DIR__ . '/../stubs/route_with_controller.stub'; |
|
35 | + return __DIR__.'/../stubs/route_with_controller.stub'; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | protected function obtainReplacements() |
44 | 44 | { |
45 | 45 | return [ |
46 | - 'ROUTE_LINK' => $this->getReplacements()[0], |
|
47 | - 'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[1]), |
|
48 | - 'ROUTE_METHOD' => $this->getReplacements()[2], |
|
46 | + 'ROUTE_LINK' => $this->getReplacements()[ 0 ], |
|
47 | + 'ROUTE_CONTROLLER' => $this->controller($this->getReplacements()[ 1 ]), |
|
48 | + 'ROUTE_METHOD' => $this->getReplacements()[ 2 ], |
|
49 | 49 | ]; |
50 | 50 | } |
51 | 51 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $tmpfile = $this->createTmpFileWithRoute(); |
96 | 96 | $path = $this->getPath($tmpfile); |
97 | 97 | add_file_into_file($this->mountpoint(), $path, $dstFile = $this->destinationFile()); |
98 | - $this->info('Route ' . $link . ' added to ' . $dstFile . '.'); |
|
98 | + $this->info('Route '.$link.' added to '.$dstFile.'.'); |
|
99 | 99 | $this->postActions(); |
100 | 100 | } |
101 | 101 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $link = $this->removeTrailingSlashIfExists($link); |
166 | 166 | $link = $this->removeDuplicatedTrailingSlashes($link); |
167 | 167 | foreach (Route::getRoutes() as $value) { |
168 | - if (in_array(strtoupper($this->option('method')), array_merge($value->getMethods(), ['ANY'])) && $value->getPath() === $link) { |
|
168 | + if (in_array(strtoupper($this->option('method')), array_merge($value->getMethods(), [ 'ANY' ])) && $value->getPath() === $link) { |
|
169 | 169 | return true; |
170 | 170 | } |
171 | 171 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | protected function apiRouteExists($link) |
207 | 207 | { |
208 | - return $this->webRouteExists('api/v1/' . $link); |
|
208 | + return $this->webRouteExists('api/v1/'.$link); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | protected function getPath($tmpfile) |
230 | 230 | { |
231 | - return stream_get_meta_data($tmpfile)['uri']; |
|
231 | + return stream_get_meta_data($tmpfile)[ 'uri' ]; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | /** |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | protected function getRouteCode() |
240 | 240 | { |
241 | 241 | $type = $this->option('type'); |
242 | - $class = isset(static::$lookup[$type]) |
|
243 | - ? static::$lookup[$type] |
|
242 | + $class = isset(static::$lookup[ $type ]) |
|
243 | + ? static::$lookup[ $type ] |
|
244 | 244 | : RegularRoute::class; |
245 | 245 | /** @var GeneratesCode $route */ |
246 | 246 | $route = new $class($this->compiler, $this->filesystem); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | */ |
293 | 293 | protected function validateMethod() |
294 | 294 | { |
295 | - if (! in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, ['ANY']))) { |
|
295 | + if (!in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, [ 'ANY' ]))) { |
|
296 | 296 | throw new MethodNotAllowedException($methods); |
297 | 297 | } |
298 | 298 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | protected function validateType() |
304 | 304 | { |
305 | - if (! in_array(strtolower($this->option('type')), ['regular','controller','resource'])) { |
|
305 | + if (!in_array(strtolower($this->option('type')), [ 'regular', 'controller', 'resource' ])) { |
|
306 | 306 | throw new RouteTypeNotValid(); |
307 | 307 | } |
308 | 308 | } |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | Artisan::call('make:view', [ |
340 | 340 | 'name' => $this->action() |
341 | 341 | ]); |
342 | - $this->info('View ' . $this->action() .'.blade.php created.'); |
|
342 | + $this->info('View '.$this->action().'.blade.php created.'); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | /** |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | 'name' => $controller = $this->controllerWithoutMethod($this->action()) |
352 | 352 | ]); |
353 | 353 | $this->addMethodToController($controller, $this->controllerMethod($this->action())); |
354 | - $this->info('Controller ' . $controller .' created.'); |
|
354 | + $this->info('Controller '.$controller.' created.'); |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | /** |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | 'name' => $controller = $this->controllerWithoutMethod($this->action()), |
364 | 364 | '--resource' => true |
365 | 365 | ]); |
366 | - $this->info('Resource Controller ' . $controller .' created.'); |
|
366 | + $this->info('Resource Controller '.$controller.' created.'); |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | /** |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | { |
377 | 377 | $tmpfile = $this->createTmpFileWithMethod($controllerMethod); |
378 | 378 | $path = $this->getPath($tmpfile); |
379 | - add_file_into_file('\/\/', $path, app_path('Http/Controllers/' . $controller . '.php')); |
|
379 | + add_file_into_file('\/\/', $path, app_path('Http/Controllers/'.$controller.'.php')); |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | /** |
@@ -415,6 +415,6 @@ discard block |
||
415 | 415 | */ |
416 | 416 | protected function getMethodStubPath() |
417 | 417 | { |
418 | - return __DIR__ . '/stubs/method.stub'; |
|
418 | + return __DIR__.'/stubs/method.stub'; |
|
419 | 419 | } |
420 | 420 | } |