| 1 | <?php |
||
| 11 | class ConfigServiceProvider extends ServiceProvider |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Bootstrap any application services. |
||
| 15 | */ |
||
| 16 | 1 | public function boot(Kernel $kernel) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Register any application services. |
||
| 27 | */ |
||
| 28 | public function register() |
||
| 29 | { |
||
| 30 | 1 | $this->app->singleton(Repository::class, function ($app) { |
|
| 31 | $config = [ |
||
| 32 | 'protected' => [ |
||
| 33 | 1 | 'app', |
|
| 34 | 1 | 'auth.defaults.guard', |
|
| 35 | 1 | ], |
|
| 36 | 1 | 'path' => $app->storagePath().'/app/', |
|
| 37 | 1 | ]; |
|
| 38 | |||
| 39 | 1 | return new DatabaseRepository($app['config'], $app->make(Config::class), $app['files'], $config); |
|
| 40 | 1 | }); |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the services provided by the provider. |
||
| 45 | * |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | 1 | public function provides() |
|
| 52 | |||
| 53 | /** |
||
| 54 | * handle publishes. |
||
| 55 | */ |
||
| 56 | 1 | protected function handlePublishes() |
|
| 62 | } |
||
| 63 |