Fix AdminSeeder to insert password hash directly without model mutator

This commit is contained in:
TheMaddax 2025-12-17 21:02:56 -07:00
parent f203bb03eb
commit d104bf5471

View file

@ -13,10 +13,12 @@ class AdminSeeder extends Seeder
public function run(): void
{
// Create Eliza admin user with password from v1.0
// Password hash copied from v1 database (bcrypt)
AdminUser::create([
// Insert directly to avoid double-hashing by the model mutator
\DB::table('admin_users')->insert([
'username' => 'eliza',
'password' => '$2a$12$gyoJoEXpig8W.GhuJG5KBeXg2AK71iyj5bX6HW24TLema5FH7ByxK', // Pre-hashed from v1
'created_at' => now(),
'updated_at' => now(),
]);
$this->command->info('Admin user created successfully!');