From 09acb4453cb7a46236f04a30727ddef9c196d553 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 28 Apr 2025 00:35:28 +0530 Subject: [PATCH] Added admin seeder and Updated User seeder --- database/seeders/AdminSeeder.php | 17 ++++++++++ database/seeders/UserSeeder.php | 53 ++++++++++---------------------- 2 files changed, 34 insertions(+), 36 deletions(-) create mode 100644 database/seeders/AdminSeeder.php diff --git a/database/seeders/AdminSeeder.php b/database/seeders/AdminSeeder.php new file mode 100644 index 000000000..077f5a014 --- /dev/null +++ b/database/seeders/AdminSeeder.php @@ -0,0 +1,17 @@ + 'Admin', - 'password' => Hash::make('admin'), + 'password' => Hash::make('jOtHi$9000'), 'updated_at' => now(), 'created_at' => now() ] @@ -35,79 +35,60 @@ class UserSeeder extends Seeder $user2 = User::updateOrCreate( // Unique identifier - ['email' => 'jothi@cripumps.com'], + ['email' => 'dhanabalan@cripumps.com'], // Data to update/create [ - 'name' => 'Jothi', - 'password' => bcrypt('jothi@123'), + 'name' => 'Dhanabalan S', + 'password' => bcrypt('SdHaNa@123'), 'updated_at' => now(), 'created_at' => now() ] ); // $user2 = User::firstOrCreate([ - // 'name' => 'Jothi', - // 'email' => 'jothi@cripumps.com', - // 'password' => bcrypt('jothi@123'), + // 'name' => 'Dhana', + // 'email' => 'dhana@cripumps.com', + // 'password' => bcrypt('dhana@123'), // ]); $user2->assignRole('Super Admin'); $user3 = User::updateOrCreate( // Unique identifier - ['email' => 'dhana@cripumps.com'], + ['email' => 'ranjith@cripumps.com'], // Data to update/create [ - 'name' => 'Dhana', - 'password' => bcrypt('dhana@123'), + 'name' => 'Ranjith B', + 'password' => bcrypt('Ranjii@5503'), 'updated_at' => now(), 'created_at' => now() ] ); // $user3 = User::firstOrCreate([ - // 'name' => 'Dhana', - // 'email' => 'dhana@cripumps.com', - // 'password' => bcrypt('dhana@123'), + // 'name' => 'Ranjith', + // 'email' => 'ranjith@cripumps.com', + // 'password' => bcrypt('ranjith@123'), // ]); $user3->assignRole('Super Admin'); $user4 = User::updateOrCreate( // Unique identifier - ['email' => 'ranjith@cripumps.com'], + ['email' => 'srimathi@cripumps.com'], // Data to update/create [ - 'name' => 'Ranjith', - 'password' => bcrypt('ranjith@123'), + 'name' => 'Srimathi M', + 'password' => bcrypt('MsRi@123'), 'updated_at' => now(), 'created_at' => now() ] ); // $user4 = User::firstOrCreate([ - // 'name' => 'Ranjith', - // 'email' => 'ranjith@cripumps.com', - // 'password' => bcrypt('ranjith@123'), - // ]); - $user4->assignRole('Super Admin'); - - $user5 = User::updateOrCreate( - // Unique identifier - ['email' => 'srimathi@cripumps.com'], - - // Data to update/create - [ - 'name' => 'Srimathi', - 'password' => bcrypt('srimathi@123'), - 'updated_at' => now(), - 'created_at' => now() - ] - ); - // $user5 = User::firstOrCreate([ // 'name' => 'Srimathi', // 'email' => 'srimathi@cripumps.com', // 'password' => bcrypt('srimathi@123'), // ]); - $user5->assignRole('Super Admin'); + $user4->assignRole('Super Admin'); // User::factory()->count(5)->create(); } }