53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class UserSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$user1 = User::create([
|
|
'name' => 'Admin',
|
|
'email' => 'admin@cripumps.com',
|
|
'password' => bcrypt('admin'),
|
|
]);
|
|
$user1->assignRole('Super Admin');
|
|
|
|
$user2 = User::create([
|
|
'name' => 'Jothi',
|
|
'email' => 'jothi@cripumps.com',
|
|
'password' => bcrypt('jothi@123'),
|
|
]);
|
|
$user2->assignRole('Super Admin');
|
|
|
|
$user3 = User::create([
|
|
'name' => 'Dhana',
|
|
'email' => 'dhana@cripumps.com',
|
|
'password' => bcrypt('dhana@123'),
|
|
]);
|
|
$user3->assignRole('Super Admin');
|
|
|
|
$user4 = User::create([
|
|
'name' => 'Ranjith',
|
|
'email' => 'ranjith@cripumps.com',
|
|
'password' => bcrypt('ranjith@123'),
|
|
]);
|
|
$user4->assignRole('Super Admin');
|
|
|
|
$user5 = User::create([
|
|
'name' => 'Srimathi',
|
|
'email' => 'srimathi@cripumps.com',
|
|
'password' => bcrypt('srimathi@123'),
|
|
]);
|
|
$user5->assignRole('Super Admin');
|
|
|
|
User::factory()->count(5)->create();
|
|
}
|
|
}
|