@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | $dashboards = []; |
| 67 | 67 | |
| 68 | 68 | foreach ((new Finder)->in($directory)->files() as $dashboard) { |
| 69 | - $dashboard = $namespace.str_replace( |
|
| 69 | + $dashboard = $namespace . str_replace( |
|
| 70 | 70 | ['/', '.php'], |
| 71 | 71 | ['\\', ''], |
| 72 | - Str::after($dashboard->getPathname(), app_path().DIRECTORY_SEPARATOR) |
|
| 72 | + Str::after($dashboard->getPathname(), app_path() . DIRECTORY_SEPARATOR) |
|
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | if (is_subclass_of($dashboard, Dashboard::class) && !(new \ReflectionClass($dashboard))->isAbstract()) { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | static::dashboards( |
| 81 | - collect($dashboards)->transform(function ($dashboard) { |
|
| 81 | + collect($dashboards)->transform(function($dashboard) { |
|
| 82 | 82 | if ($dashboard instanceof Dashboard) { |
| 83 | 83 | return $dashboard; |
| 84 | 84 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | return collect(static::$dashboards) |
| 125 | 125 | ->filter |
| 126 | 126 | ->authorize($request) |
| 127 | - ->flatMap(function ($dashboard) { |
|
| 127 | + ->flatMap(function($dashboard) { |
|
| 128 | 128 | return $dashboard->cards(); |
| 129 | 129 | })->merge(static::$cards) |
| 130 | 130 | ->unique() |
@@ -142,9 +142,9 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public static function availableDashboardCardsForDashboard($dashboard, NovaRequest $request) |
| 144 | 144 | { |
| 145 | - return collect(static::$dashboards)->filter->authorize($request)->filter(function ($board) use ($dashboard) { |
|
| 145 | + return collect(static::$dashboards)->filter->authorize($request)->filter(function($board) use ($dashboard) { |
|
| 146 | 146 | return $board->uriKey() === $dashboard; |
| 147 | - })->flatMap(function ($dashboard) { |
|
| 147 | + })->flatMap(function($dashboard) { |
|
| 148 | 148 | return $dashboard->cards(); |
| 149 | 149 | })->filter->authorize($request)->values(); |
| 150 | 150 | } |