Initial commit with contrats and domaines modules
This commit is contained in:
25
database/seeders/AdminUserSeeder.php
Normal file
25
database/seeders/AdminUserSeeder.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Models\User;
|
||||
|
||||
class AdminUserSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$admin = User::firstOrCreate(
|
||||
['email' => 'admin@dsi.local'],
|
||||
[
|
||||
'name' => 'Administrateur',
|
||||
'password' => Hash::make('password'),
|
||||
'email_verified_at' => now(),
|
||||
'active' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$admin->assignRole('admin');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user