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: * Run the database seeds.
12: *
13: * @return void
14: */
15: public function run()
16: {
17: Model::unguard();
18:
19: $channel = Channel::firstOrCreate([
20: 'Login' => 'Default'
21: ]);
22:
23: Tenant::firstOrCreate([
24: 'IdChannel' => $channel->Id,
25: 'Name' => 'Default',
26: 'IsDefault' => true
27: ]);
28:
29: Model::reguard();
30: }
31: }
32: