| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class MasterServiceProvider extends ServiceProvider |
||
| 11 | { |
||
| 12 | public function register() |
||
| 13 | { |
||
| 14 | $this->app->bind('master', function () { |
||
| 15 | return new MasterService(); |
||
| 16 | }); |
||
| 17 | |||
| 18 | $this->commands([ |
||
| 19 | SeedCommand::class, |
||
| 20 | SyncCoordinateCommand::class, |
||
| 21 | ]); |
||
| 22 | } |
||
| 23 | |||
| 24 | /* |
||
| 25 | for lumen version <=5.2, just copy the migrations from the package directory |
||
| 26 | */ |
||
| 27 | public function boot() |
||
| 28 | { |
||
| 29 | $this->mergeConfigFrom(__DIR__.'/../config/master.php', 'master-data'); |
||
| 30 | |||
| 31 | $databasePath = __DIR__.'/../database/migrations'; |
||
| 32 | $this->loadMigrationsFrom($databasePath); |
||
| 33 | |||
| 34 | if (class_exists(Application::class)) { |
||
| 35 | $this->publishes( |
||
| 36 | [ |
||
| 37 | __DIR__.'/../config/master.php' => config_path('master-data.php'), |
||
| 38 | ], |
||
| 39 | 'config' |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->loadViewsFrom(realpath(__DIR__.'/../resources/views'), 'master'); |
||
| 44 | |||
| 45 | $this->registerRoutes(); |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function registerRoutes() |
||
| 52 | } |
||
| 53 | } |
||
| 54 |