master_template/database/seeders/UserSeeder.php
2024-06-20 16:42:33 +05:45

26 lines
587 B
PHP

<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
User::create([
'name' => 'Prajwal Adhikari',
'email' => 'prajwalbro@hotmail.com',
'username' => 'prajwalbro',
'password' => bcrypt('p@ssw0rd'),
'status' => 1,
'email_verified_at' => now(),
])->assignRole('admin', 'editor');
}
}