36 lines
857 B
PHP
36 lines
857 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\PlatformUser;
|
|
use App\Models\Tenant;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class PlatformUserSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
Tenant::query()->updateOrCreate(
|
|
['external_id' => 'platform'],
|
|
['name' => 'Platform'],
|
|
);
|
|
|
|
PlatformUser::query()->updateOrCreate(
|
|
['email' => 'operator@tenantpilot.io'],
|
|
[
|
|
'name' => 'Platform Operator',
|
|
'password' => Hash::make('password'),
|
|
'capabilities' => [
|
|
'platform.access_system_panel',
|
|
'platform.use_break_glass',
|
|
],
|
|
'is_active' => true,
|
|
],
|
|
);
|
|
}
|
|
}
|