dev-think-one /
nova-naviga-ad-preview
| 1 | <?php |
||
| 2 | |||
| 3 | namespace NovaNavigaAdPreview; |
||
| 4 | |||
| 5 | use Illuminate\Support\Facades\Route; |
||
| 6 | use Laravel\Nova\Events\ServingNova; |
||
| 7 | use Laravel\Nova\Http\Middleware\Authenticate; |
||
| 8 | use Laravel\Nova\Nova; |
||
| 9 | use NovaNavigaAdPreview\Http\Middleware\Authorize; |
||
| 10 | |||
| 11 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 12 | { |
||
| 13 | 2 | public function boot(): void |
|
| 14 | { |
||
| 15 | 2 | $this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-naviga-ad-preview'); |
|
| 16 | |||
| 17 | 2 | $this->app->booted(function () { |
|
| 18 | 2 | $this->routes(); |
|
| 19 | 2 | }); |
|
| 20 | |||
| 21 | 2 | Nova::serving(function (ServingNova $event) { |
|
|
0 ignored issues
–
show
|
|||
| 22 | // |
||
| 23 | 2 | }); |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Register any application services. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | 2 | public function register() |
|
| 32 | { |
||
| 33 | // |
||
| 34 | 2 | } |
|
| 35 | |||
| 36 | 2 | protected function routes(): void |
|
| 37 | { |
||
| 38 | 2 | if ($this->app->routesAreCached()) { |
|
| 39 | return; |
||
| 40 | } |
||
| 41 | |||
| 42 | // Load admin dashboard routes |
||
| 43 | 2 | Nova::router( |
|
| 44 | 2 | ['nova', Authenticate::class, Authorize::class], |
|
| 45 | 2 | 'nova-naviga-ad-preview' |
|
| 46 | 2 | ) |
|
| 47 | 2 | ->group(__DIR__.'/../routes/inertia.php'); |
|
| 48 | |||
| 49 | // Load api routes |
||
| 50 | 2 | Route::middleware(['nova', Authorize::class]) |
|
| 51 | 2 | ->prefix('nova-vendor/nova-naviga-ad-preview') |
|
| 52 | 2 | ->group(__DIR__.'/../routes/api.php'); |
|
| 53 | } |
||
| 54 | } |
||
| 55 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.