mirror of https://github.com/4xmen/xshop.git
added user seeder
parent
b1f7890866
commit
e9595486f7
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// developer
|
||||
User::factory()->create(
|
||||
[
|
||||
'name' => 'WebDeveloper',
|
||||
'email' => 'developer@example.com',
|
||||
'role'=> 'DEVELOPER',
|
||||
]
|
||||
);
|
||||
// website admin
|
||||
User::factory()->create(
|
||||
[
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@example.com',
|
||||
'role'=> 'ADMIN',
|
||||
]
|
||||
);
|
||||
// website user
|
||||
User::factory()->create(
|
||||
[
|
||||
'name' => 'ManagerUser',
|
||||
'email' => 'user@example.com',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue