Fix AdminSeeder to insert password hash directly without model mutator
This commit is contained in:
parent
f203bb03eb
commit
d104bf5471
1 changed files with 4 additions and 2 deletions
|
|
@ -13,10 +13,12 @@ class AdminSeeder extends Seeder
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
// Create Eliza admin user with password from v1.0
|
// Create Eliza admin user with password from v1.0
|
||||||
// Password hash copied from v1 database (bcrypt)
|
// Insert directly to avoid double-hashing by the model mutator
|
||||||
AdminUser::create([
|
\DB::table('admin_users')->insert([
|
||||||
'username' => 'eliza',
|
'username' => 'eliza',
|
||||||
'password' => '$2a$12$gyoJoEXpig8W.GhuJG5KBeXg2AK71iyj5bX6HW24TLema5FH7ByxK', // Pre-hashed from v1
|
'password' => '$2a$12$gyoJoEXpig8W.GhuJG5KBeXg2AK71iyj5bX6HW24TLema5FH7ByxK', // Pre-hashed from v1
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->command->info('Admin user created successfully!');
|
$this->command->info('Admin user created successfully!');
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue