| Conditions | 2 |
| Paths | 2 |
| Total Lines | 27 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function boot() |
||
| 14 | { |
||
| 15 | // Publish the configurable config file for the user |
||
| 16 | $this->publishes([__DIR__.'/config/multi-tenant.php' => config_path('multi-tenant.php')], 'multi-tenant'); |
||
| 17 | |||
| 18 | // Make views publishable to the vendor folder in a project |
||
| 19 | $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/multi-tenant')]); |
||
| 20 | |||
| 21 | // Load any routes |
||
| 22 | $this->loadRoutesFrom(__DIR__.'/routes/routes.php'); |
||
| 23 | |||
| 24 | // Load any migrations |
||
| 25 | $this->loadMigrationsFrom(__DIR__.'/database/migrations'); |
||
| 26 | |||
| 27 | // Load any views |
||
| 28 | $this->loadViewsFrom(__DIR__.'/resources/views', 'multi-tenant'); |
||
| 29 | |||
| 30 | // Setup a middleware for the multi tenacy |
||
| 31 | app('router')->aliasMiddleware('multi-tenant', \MultiTenantLaravel\App\Http\Middleware\MultiTenantMiddleware::class); |
||
| 32 | |||
| 33 | // Register any commands we want available to the user |
||
| 34 | if ($this->app->runningInConsole()) { |
||
| 35 | $this->commands([ |
||
| 36 | CreateTenant::class, |
||
| 37 | ]); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 49 |