Completed
Push — master ( c15d2c...012343 )
by jxlwqq
02:48 queued 11s
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/')
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 && in_array('GET', $route->methods())
59 59
                 && !in_array(substr($route->uri(), strlen('admin/')), config('admin.menu_exclude'));
60 60
         })
61
-            ->map(function (Route $route) {
61
+            ->map(function(Route $route) {
62 62
                 $uri = substr($route->uri(), strlen('admin/'));
63 63
 
64 64
                 return [
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $menus = Menu::all()->pluck('title', 'uri');
74 74
         // exclude exist ones
75
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
75
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
76 76
             return [
77 77
                 'title' => $item,
78 78
                 'uri'   => $key,
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         } else {
87 87
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
88 88
                 $this->line('<info>The following menu items will be created</info>: ');
89
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
89
+                $this->table(['Title', 'Uri'], array_map(function($item) {
90 90
                     return [
91 91
                         $item['title'],
92 92
                         $item['uri'],
Please login to merge, or discard this patch.