Completed
Push — master ( 2bd347...5de9c8 )
by jxlwqq
17s queued 11s
created
src/Console/GenerateMenuCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function handle()
50 50
     {
51 51
         $prefix = config('admin.route.prefix');
52
-        $routes = collect($this->router->getRoutes())->filter(function (Route $route) use ($prefix) {
52
+        $routes = collect($this->router->getRoutes())->filter(function(Route $route) use ($prefix) {
53 53
             $uri = $route->uri();
54 54
             // built-in, parameterized and no-GET are ignored
55 55
             return Str::startsWith($uri, "{$prefix}/")
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 && in_array('GET', $route->methods())
60 60
                 && !in_array(substr($route->uri(), strlen("{$prefix}/")), config('admin.menu_exclude'));
61 61
         })
62
-            ->map(function (Route $route) use ($prefix) {
62
+            ->map(function(Route $route) use ($prefix) {
63 63
                 $uri = substr($route->uri(), strlen("{$prefix}/"));
64 64
 
65 65
                 return [
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $menus = Menu::all()->pluck('title', 'uri');
75 75
         // exclude exist ones
76
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
76
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
77 77
             return [
78 78
                 'title' => $item,
79 79
                 'uri'   => $key,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         } else {
88 88
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
89 89
                 $this->line('<info>The following menu items will be created</info>: ');
90
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
90
+                $this->table(['Title', 'Uri'], array_map(function($item) {
91 91
                     return [
92 92
                         $item['title'],
93 93
                         $item['uri'],
Please login to merge, or discard this patch.