| 1 | <?php |
||
| 2 | |||
| 3 | namespace Fomvasss\MediaLibraryExtension; |
||
| 4 | |||
| 5 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Bootstrap the application services. |
||
| 9 | * |
||
| 10 | * @return void |
||
| 11 | */ |
||
| 12 | public function boot() |
||
| 13 | { |
||
| 14 | $this->publishes([ |
||
| 15 | __DIR__.'/../config/medialibrary-extension.php' => config_path('medialibrary-extension.php') |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 16 | ], 'config'); |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Register the application services. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function register() |
||
| 25 | { |
||
| 26 | $this->mergeConfigFrom(__DIR__.'/../config/medialibrary-extension.php', 'medialibrary-extension'); |
||
| 27 | |||
| 28 | $this->app->singleton(MediaLibraryManager::class, function () { |
||
| 29 | return new MediaLibraryManager(); |
||
| 30 | }); |
||
| 31 | |||
| 32 | $this->app->alias(MediaLibraryManager::class, 'medialibrary-manager'); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |