| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | public function handle() |
||
| 46 | { |
||
| 47 | $tenantId = $this->argument('tenantId'); |
||
| 48 | $tenant = Tenant::find($tenantId); |
||
| 49 | |||
| 50 | if (!$tenant) { |
||
| 51 | throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.'); |
||
|
|
|||
| 52 | } |
||
| 53 | |||
| 54 | $this->tenantManager->setTenant($tenant); |
||
| 55 | \DB::purge('tenant'); |
||
| 56 | |||
| 57 | $seeder = new \RolesAndPermissionsSeeder('tenant'); |
||
| 58 | $seeder->run(null); |
||
| 59 | |||
| 60 | $this->info('Data have been seeded for tenant with subdomain \''.$tenant->subdomain.'\'.'); |
||
| 61 | } |
||
| 63 |