- Rollenbasierte Policies, Navigationsgruppen - Media Library (Spatie) für die kommende Bildverwaltung installiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
814 B
PHP
32 lines
814 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasDescription;
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum UserRole: string implements HasDescription, HasLabel
|
|
{
|
|
case Admin = 'admin';
|
|
case Rentals = 'rentals';
|
|
case Content = 'content';
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::Admin => 'Administrator',
|
|
self::Rentals => 'Vermietung',
|
|
self::Content => 'Inhalte',
|
|
};
|
|
}
|
|
|
|
public function getDescription(): string
|
|
{
|
|
return match ($this) {
|
|
self::Admin => 'Alles, inklusive Benutzerverwaltung',
|
|
self::Rentals => 'Buchungen, Gäste, Preise, Angebote und Bewertungen',
|
|
self::Content => 'Bilder, Texte, FAQ, Hinweise und Bewertungen',
|
|
};
|
|
}
|
|
}
|