Aknaproff/database/seeders/UsersTableSeeder.php
2023-09-21 15:01:58 +01:00

28 lines
544 B
PHP

<?php
namespace Database\Seeders;
use App\Enums\User\RoleEnum;
use App\User;
use Illuminate\Database\Seeder;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
User::query()
->create([
'name' => 'admin',
'email' => 'admin@admin.com',
'password' => bcrypt(12345678),
'is_active' => 1,
])
->assignRole(RoleEnum::SUPERVISOR->value);
}
}