Complete TP7 TP8 authentication authorization and classic CSS

This commit is contained in:
2026-10-21 00:48:38 +02:00
parent 4a84a17cbf
commit ffe85d5f0d
101 changed files with 7643 additions and 110 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Run the database seeds.
*/
public function run(): void
{
// TP7 et TP8 : deux comptes permettent de comparer authentification et autorisation.
User::updateOrCreate(
['email' => 'jean@example.com'],
[
'name' => 'Jean Dupont',
'password' => Hash::make('password123'),
'is_admin' => true,
],
);
User::updateOrCreate(
['email' => 'marie@example.com'],
[
'name' => 'Marie Martin',
'password' => Hash::make('password123'),
'is_admin' => false,
],
);
}
}