@@ -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 | } |
@@ -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 | } |