Benutzerrollen (Administrator, Vermietung, Inhalte) und Benutzerverwaltung

- Rollenbasierte Policies, Navigationsgruppen
- Media Library (Spatie) für die kommende Bildverwaltung installiert

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 10:13:55 +02:00
1 parent 08b6582fa1
commit 27ea12901e
25 files changed
+1341 -81

No files matched your search

+7
View File
@@ -2,6 +2,7 @@
namespace Database\Factories;
use App\Enums\UserRole;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
@@ -30,9 +31,15 @@ public function definition(): array
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
'role' => UserRole::Admin,
];
}
public function role(?UserRole $role): static
{
return $this->state(fn (): array => ['role' => $role]);
}
/**
* Indicate that the model's email address should be unverified.
*/