dev-think-one /
nova-text-card
| 1 | <?php |
||
| 2 | |||
| 3 | namespace NovaTextCard; |
||
| 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 | * @return void |
||
| 15 | */ |
||
| 16 | 2 | public function boot() |
|
| 17 | { |
||
| 18 | 2 | $this->app->booted(function () { |
|
| 19 | 2 | $this->routes(); |
|
| 20 | 2 | }); |
|
| 21 | |||
| 22 | 2 | Nova::serving(function (ServingNova $event) { |
|
|
0 ignored issues
–
show
|
|||
| 23 | Nova::script('nova-text-card', __DIR__.'/../dist/js/card.js'); |
||
| 24 | Nova::style('nova-text-card', __DIR__.'/../dist/css/card.css'); |
||
| 25 | 2 | }); |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Register the card's routes. |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | 2 | protected function routes() |
|
| 34 | { |
||
| 35 | 2 | if ($this->app->routesAreCached()) { |
|
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | 2 | Route::middleware(['nova']) |
|
| 40 | 2 | ->prefix('nova-vendor/nova-text-card') |
|
| 41 | 2 | ->group(__DIR__.'/../routes/api.php'); |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Register any application services. |
||
| 46 | * |
||
| 47 | * @return void |
||
| 48 | */ |
||
| 49 | 2 | public function register() |
|
| 50 | { |
||
| 51 | // |
||
| 52 | 2 | } |
|
| 53 | } |
||
| 54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.