|
4 | 4 |
|
5 | 5 | use Illuminate\Support\ServiceProvider; |
6 | 6 | use Livewire\Livewire; |
7 | | -use Maatwebsite\Excel\ExcelServiceProvider; |
| 7 | +use Livewire\LivewireServiceProvider; |
8 | 8 | use Yajra\DataTables\Commands\DataTablesPurgeExportCommand; |
9 | | -use Yajra\DataTables\Generators\DataTablesHtmlCommand; |
10 | | -use Yajra\DataTables\Generators\DataTablesMakeCommand; |
11 | | -use Yajra\DataTables\Generators\DataTablesScopeCommand; |
12 | 9 | use Yajra\DataTables\Livewire\ExportButtonComponent; |
13 | 10 |
|
14 | 11 | class ExportServiceProvider extends ServiceProvider |
15 | 12 | { |
16 | | - /** |
17 | | - * Bootstrap the application events. |
18 | | - * |
19 | | - * @return void |
20 | | - */ |
21 | | - public function boot() |
| 13 | + public function boot(): void |
22 | 14 | { |
23 | | - $this->loadViewsFrom(__DIR__ . '/resources/views', 'datatables-export'); |
| 15 | + $this->loadViewsFrom(__DIR__.'/resources/views', 'datatables-export'); |
24 | 16 |
|
25 | 17 | $this->publishAssets(); |
26 | 18 |
|
27 | 19 | Livewire::component('export-button', ExportButtonComponent::class); |
28 | 20 | } |
29 | 21 |
|
30 | | - /** |
31 | | - * Publish datatables assets. |
32 | | - */ |
33 | | - protected function publishAssets() |
| 22 | + protected function publishAssets(): void |
34 | 23 | { |
35 | 24 | $this->publishes([ |
36 | | - __DIR__ . '/config/datatables-export.php' => config_path('datatables-export.php'), |
| 25 | + __DIR__.'/config/datatables-export.php' => config_path('datatables-export.php'), |
37 | 26 | ], 'datatables-export'); |
38 | 27 |
|
39 | 28 | $this->publishes([ |
40 | | - __DIR__ . '/resources/views' => base_path('/resources/views/vendor/datatables-export'), |
| 29 | + __DIR__.'/resources/views' => base_path('/resources/views/vendor/datatables-export'), |
41 | 30 | ], 'datatables-export'); |
42 | 31 | } |
43 | 32 |
|
44 | | - /** |
45 | | - * Register the service provider. |
46 | | - * |
47 | | - * @return void |
48 | | - */ |
49 | | - public function register() |
| 33 | + public function register(): void |
50 | 34 | { |
51 | | - $this->mergeConfigFrom(__DIR__ . '/config/datatables-export.php', 'datatables-export'); |
| 35 | + $this->mergeConfigFrom(__DIR__.'/config/datatables-export.php', 'datatables-export'); |
52 | 36 |
|
53 | 37 | $this->commands([DataTablesPurgeExportCommand::class]); |
| 38 | + |
| 39 | + $this->app->register(LivewireServiceProvider::class); |
54 | 40 | } |
55 | 41 | } |
0 commit comments