1 | <?php |
||
2 | |||
3 | namespace NovaListCard; |
||
4 | |||
5 | use Illuminate\Support\Facades\Route; |
||
6 | use Laravel\Nova\Events\ServingNova; |
||
7 | use Laravel\Nova\Nova; |
||
8 | |||
9 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
10 | { |
||
11 | /** |
||
12 | * Bootstrap any application services. |
||
13 | */ |
||
14 | 14 | public function boot() |
|
15 | { |
||
16 | 14 | $this->app->booted(function () { |
|
17 | 14 | $this->routes(); |
|
18 | 14 | }); |
|
19 | |||
20 | 14 | Nova::serving(function (ServingNova $event) { |
|
0 ignored issues
–
show
|
|||
21 | 6 | Nova::script('list-card', __DIR__ . '/../dist/js/card.js'); |
|
22 | 14 | }); |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Register the card's routes. |
||
27 | */ |
||
28 | 14 | protected function routes() |
|
29 | { |
||
30 | 14 | if ($this->app->routesAreCached()) { |
|
31 | return; |
||
32 | } |
||
33 | |||
34 | 14 | Route::middleware(['nova']) |
|
35 | 14 | ->prefix('nova-vendor/nova-list-card') |
|
36 | 14 | ->group(function () { |
|
37 | 14 | Route::get( |
|
38 | 14 | '/{key}', |
|
39 | 14 | \NovaListCard\Http\Controllers\ResourceController::class |
|
40 | 14 | )->name('nova-list-card.data'); |
|
41 | 14 | }); |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Register any application services. |
||
46 | */ |
||
47 | 14 | public function register() |
|
48 | { |
||
49 | 14 | } |
|
50 | } |
||
51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.