info('Starting password hashing process...'); // Hash UserDosen passwords $dosenCount = 0; UserDosen::whereNotNull('password') ->whereRaw("password NOT LIKE '$2y$%'") ->whereRaw("password NOT LIKE '$2a$%'") ->whereRaw("password NOT LIKE '$2b$%'") ->chunk(100, function ($users) use (&$dosenCount) { foreach ($users as $user) { $user->update(['password' => Hash::make($user->password)]); $dosenCount++; } }); $this->info("✓ Hashed {$dosenCount} Dosen passwords"); // Hash UserStaff passwords $staffCount = 0; UserStaff::whereNotNull('password') ->whereRaw("password NOT LIKE '$2y$%'") ->whereRaw("password NOT LIKE '$2a$%'") ->whereRaw("password NOT LIKE '$2b$%'") ->chunk(100, function ($users) use (&$staffCount) { foreach ($users as $user) { $user->update(['password' => Hash::make($user->password)]); $staffCount++; } }); $this->info("✓ Hashed {$staffCount} Staff passwords"); $this->info('Password hashing completed successfully!'); $this->info("Total: {$dosenCount} Dosen + {$staffCount} Staff = " . ($dosenCount + $staffCount) . ' passwords hashed'); } }