1 | <?php |
||||
2 | |||||
3 | namespace UniSharp\LaravelFilemanager; |
||||
4 | |||||
5 | use Illuminate\Support\Facades\Route; |
||||
6 | use Illuminate\Support\ServiceProvider; |
||||
7 | |||||
8 | /** |
||||
9 | * Class LaravelFilemanagerServiceProvider. |
||||
10 | */ |
||||
11 | class LaravelFilemanagerServiceProvider extends ServiceProvider |
||||
12 | { |
||||
13 | /** |
||||
14 | * Bootstrap the application services. |
||||
15 | * |
||||
16 | * @return void |
||||
17 | */ |
||||
18 | public function boot() |
||||
19 | { |
||||
20 | $this->loadTranslationsFrom(__DIR__.'/lang', 'laravel-filemanager'); |
||||
21 | |||||
22 | $this->loadViewsFrom(__DIR__.'/views', 'laravel-filemanager'); |
||||
23 | |||||
24 | $this->publishes([ |
||||
25 | __DIR__ . '/config/lfm.php' => base_path('config/lfm.php'), |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
26 | ], 'lfm_config'); |
||||
27 | |||||
28 | $this->publishes([ |
||||
29 | __DIR__.'/../public' => public_path('vendor/laravel-filemanager'), |
||||
0 ignored issues
–
show
The function
public_path was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
30 | ], 'lfm_public'); |
||||
31 | |||||
32 | $this->publishes([ |
||||
33 | __DIR__.'/views' => base_path('resources/views/vendor/laravel-filemanager'), |
||||
34 | ], 'lfm_view'); |
||||
35 | |||||
36 | $this->publishes([ |
||||
37 | __DIR__.'/Handlers/LfmConfigHandler.php' => base_path('app/Handlers/LfmConfigHandler.php'), |
||||
38 | ], 'lfm_handler'); |
||||
39 | |||||
40 | if (config('lfm.use_package_routes')) { |
||||
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
41 | Route::group(['prefix' => 'filemanager', 'middleware' => ['web', 'auth']], function () { |
||||
42 | \UniSharp\LaravelFilemanager\Lfm::routes(); |
||||
43 | }); |
||||
44 | } |
||||
45 | } |
||||
46 | |||||
47 | /** |
||||
48 | * Register the application services. |
||||
49 | * |
||||
50 | * @return void |
||||
51 | */ |
||||
52 | public function register() |
||||
53 | { |
||||
54 | $this->mergeConfigFrom(__DIR__ . '/config/lfm.php', 'lfm-config'); |
||||
55 | |||||
56 | $this->app->singleton('laravel-filemanager', function () { |
||||
57 | return true; |
||||
58 | }); |
||||
59 | } |
||||
60 | } |
||||
61 |