Completed
Push — master ( 38f186...df7470 )
by Song
25s queued 10s
created
src/Console/GenerateMenuCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function handle()
50 50
     {
51
-        $routes = collect($this->router->getRoutes())->filter(function (Route $route) {
51
+        $routes = collect($this->router->getRoutes())->filter(function(Route $route) {
52 52
             $uri = $route->uri();
53 53
             // built-in, parameterized and no-GET are ignored
54 54
             return Str::startsWith($uri, 'admin/')
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 && !Str::contains($uri, '{')
58 58
                 && in_array('GET', $route->methods());
59 59
         })
60
-            ->map(function (Route $route) {
60
+            ->map(function(Route $route) {
61 61
                 $uri = substr($route->uri(), strlen('admin/'));
62 62
 
63 63
                 return [
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $menus = Menu::all()->pluck('title', 'uri');
73 73
         // exclude exist ones
74
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
74
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
75 75
             return [
76 76
                 'title' => $item,
77 77
                 'uri'   => $key,
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         } else {
86 86
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
87 87
                 $this->line('<info>The following menu items will be created</info>: ');
88
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
88
+                $this->table(['Title', 'Uri'], array_map(function($item) {
89 89
                     return [
90 90
                         $item['title'],
91 91
                         $item['uri'],
Please login to merge, or discard this patch.