1: | <?php |
2: | |
3: | use Aurora\Modules\Core\Models\Channel; |
4: | use Aurora\Modules\Core\Models\Tenant; |
5: | use Illuminate\Database\Eloquent\Model; |
6: | use Illuminate\Database\Seeder; |
7: | |
8: | class DatabaseSeeder extends Seeder |
9: | { |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | public function run() |
16: | { |
17: | Model::unguard(); |
18: | |
19: | |
20: | $channel = Channel::query()->firstOrCreate([ |
21: | 'Login' => 'Default' |
22: | ]); |
23: | |
24: | Tenant::query()->firstOrCreate([ |
25: | 'IdChannel' => $channel->Id, |
26: | 'Name' => 'Default', |
27: | 'IsDefault' => true |
28: | ]); |
29: | |
30: | Model::reguard(); |
31: | } |
32: | } |
33: | |