| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ModuleManagerServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 8 | { |
||
| 9 | protected $defer = false; |
||
| 10 | |||
| 11 | public function boot() |
||
| 12 | { |
||
| 13 | $this->publishes([ |
||
| 14 | __DIR__ . '/../config/module_manager.php' => config_path('module_manager.php'), |
||
| 15 | ]); |
||
| 16 | |||
| 17 | $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function register() |
||
| 21 | { |
||
| 22 | $this->mergeConfigFrom(__DIR__ . '/../config/module_manager.php', 'module_manager'); |
||
| 23 | |||
| 24 | $this->app->singleton(ModuleManager::class, function ($app) { |
||
| 25 | return new ModuleManager($app, $app->make(ModuleRegistryRepository::class)); |
||
| 26 | }); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function provides() |
||
| 32 | } |
||
| 33 | } |
||
| 34 |