28 lines
801 B
PHP
28 lines
801 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\AdminUser;
|
|
|
|
class AdminSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// Create Eliza admin user with password from v1.0
|
|
// 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!');
|
|
$this->command->info('Username: eliza');
|
|
$this->command->info('Password: (same as v1.0)');
|
|
}
|
|
}
|