feat: add owner user creation in UserSeeder with associated profile and role assignment
This commit is contained in:
parent
459d568c1a
commit
d2b763ba57
@ -28,6 +28,20 @@ public function run(): void
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$developer->assignRole(Role::DEVELOPER->value);
|
$developer->assignRole(Role::DEVELOPER->value);
|
||||||
|
|
||||||
|
$owner = User::factory()->create([
|
||||||
|
'email' => 'owner@gmail.com',
|
||||||
|
'username' => 'owner',
|
||||||
|
'password' => config('auth.password_default'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
UserProfile::factory()->create([
|
||||||
|
'user_id' => $owner->id,
|
||||||
|
'full_name' => 'Owner',
|
||||||
|
'gender' => Gender::MALE->value,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$owner->assignRole(Role::OWNER->value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user