@@ -63,10 +63,10 @@ discard block |
||
| 63 | 63 | $dashboards = []; |
| 64 | 64 | |
| 65 | 65 | foreach ((new Finder)->in($directory)->files() as $dashboard) { |
| 66 | - $dashboard = $namespace.str_replace( |
|
| 66 | + $dashboard = $namespace . str_replace( |
|
| 67 | 67 | ['/', '.php'], |
| 68 | 68 | ['\\', ''], |
| 69 | - Str::after($dashboard->getPathname(), app_path().DIRECTORY_SEPARATOR) |
|
| 69 | + Str::after($dashboard->getPathname(), app_path() . DIRECTORY_SEPARATOR) |
|
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | if (is_subclass_of($dashboard, Dashboard::class) && !(new \ReflectionClass($dashboard))->isAbstract()) { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | static::dashboards( |
| 78 | - collect($dashboards)->sort()->transform(function ($dashboard) { |
|
| 78 | + collect($dashboards)->sort()->transform(function($dashboard) { |
|
| 79 | 79 | if ($dashboard instanceof Dashboard) { |
| 80 | 80 | return $dashboard; |
| 81 | 81 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | return collect(static::$dashboards) |
| 122 | 122 | ->filter |
| 123 | 123 | ->authorize($request) |
| 124 | - ->flatMap(function ($dashboard) { |
|
| 124 | + ->flatMap(function($dashboard) { |
|
| 125 | 125 | return $dashboard->cards(); |
| 126 | 126 | })->merge(static::$cards) |
| 127 | 127 | ->unique() |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public static function availableDashboardCardsForDashboard($dashboard, NovaRequest $request) |
| 141 | 141 | { |
| 142 | - return collect(static::$dashboards)->filter->authorize($request)->filter(function ($board) use ($dashboard) { |
|
| 142 | + return collect(static::$dashboards)->filter->authorize($request)->filter(function($board) use ($dashboard) { |
|
| 143 | 143 | return $board->uriKey() === $dashboard; |
| 144 | - })->flatMap(function ($dashboard) { |
|
| 144 | + })->flatMap(function($dashboard) { |
|
| 145 | 145 | return $dashboard->cards(); |
| 146 | 146 | })->filter->authorize($request)->values(); |
| 147 | 147 | } |
@@ -59,6 +59,6 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | protected function getDefaultNamespace($rootNamespace) |
| 61 | 61 | { |
| 62 | - return $rootNamespace.'\Nova\Dashboards'; |
|
| 62 | + return $rootNamespace . '\Nova\Dashboards'; |
|
| 63 | 63 | } |
| 64 | 64 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function metric() |
| 18 | 18 | { |
| 19 | - return $this->availableMetrics()->first(function ($metric) { |
|
| 19 | + return $this->availableMetrics()->first(function($metric) { |
|
| 20 | 20 | return $this->metric === $metric->uriKey(); |
| 21 | 21 | }) ?: abort(404); |
| 22 | 22 | } |
@@ -20,15 +20,15 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | $this->loadViewsFrom(__DIR__ . '/../resources/views/nova-overrides', 'nova'); |
| 22 | 22 | |
| 23 | - Nova::serving(function (ServingNova $event) { |
|
| 23 | + Nova::serving(function(ServingNova $event) { |
|
| 24 | 24 | DashboardNova::dashboardsIn(app_path('Nova/Dashboards')); |
| 25 | 25 | Nova::script('nova-multiple-dashboard', __DIR__ . '/../dist/js/MultipleDashboard.js'); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - $this->app->booted(function () { |
|
| 28 | + $this->app->booted(function() { |
|
| 29 | 29 | $this->routes(); |
| 30 | 30 | |
| 31 | - Nova::serving(function (ServingNova $event) { |
|
| 31 | + Nova::serving(function(ServingNova $event) { |
|
| 32 | 32 | DashboardNova::copyDefaultDashboardCards(); |
| 33 | 33 | DashboardNova::cardsInDashboards(); |
| 34 | 34 | }); |
@@ -54,6 +54,6 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | Route::middleware('nova') |
| 56 | 56 | ->prefix('nova-vendor/AlexBowers/nova-multiple-dashboard') |
| 57 | - ->group(__DIR__.'/../routes/api.php'); |
|
| 57 | + ->group(__DIR__ . '/../routes/api.php'); |
|
| 58 | 58 | } |
| 59 | 59 | } |