Initialize repo and add session changes (2025-09-08)
This commit is contained in:
22
database/seeders/SuperAdminSeeder.php
Normal file
22
database/seeders/SuperAdminSeeder.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Models\User;
|
||||
|
||||
class SuperAdminSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$email = env('ADMIN_EMAIL', 'admin@example.com');
|
||||
$password = env('ADMIN_PASSWORD', 'ChangeMe123!');
|
||||
User::updateOrCreate(['email'=>$email], [
|
||||
'name' => 'Super Admin',
|
||||
'password' => Hash::make($password),
|
||||
'role' => 'super_admin',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user