| 1 | <?php |
||
| 7 | class UploadServiceProvider extends ServiceProvider |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Bootstrap any application services. |
||
| 11 | */ |
||
| 12 | 1 | public function boot() |
|
| 18 | |||
| 19 | /** |
||
| 20 | * Register the service provider. |
||
| 21 | */ |
||
| 22 | 1 | public function register() |
|
| 23 | { |
||
| 24 | 1 | $this->mergeConfigFrom(__DIR__.'/../config/upload.php', 'upload'); |
|
| 25 | |||
| 26 | 1 | $this->app->singleton(Filesystem::class, Filesystem::class); |
|
| 27 | $this->app->singleton(UploadManager::class, function ($app) { |
||
| 28 | 1 | return new UploadManager($app, $app['request'], $app->make(Filesystem::class)); |
|
| 29 | 1 | }); |
|
| 30 | 1 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * handle publishes. |
||
| 34 | */ |
||
| 35 | 1 | protected function handlePublishes() |
|
| 41 | } |
||
| 42 |