Files
fewo-stommer/app/Filament/Resources/Guests/GuestResource.php
T
Lars StommerandClaude Opus 5.5 2892e6aeab Gästeverzeichnis und Customer Voice
- Gäste: Markierungen, Aufenthalte & Umsatz, Stammgast-/Einwilligungsfilter, CSV-Export, Anonymisierung (manuell + automatisch nach Aufbewahrungsfrist)
- Werbe-Einwilligung per Double-Opt-in aus dem Anfrageformular, signierte Bestätigungs-/Abmeldelinks
- Bewertungen: automatische Einladung nach Abreise, Bewertungsformular mit Kategorien und internem Feedback, Freigabe und öffentliche Antwort im Admin
- Konzept: Rollen, Inhalte, Customer Voice, Architektur Portal-Sync/Buchungshoheit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:26:11 +02:00

61 lines
1.6 KiB
PHP

<?php
namespace App\Filament\Resources\Guests;
use App\Filament\Resources\Guests\Pages\CreateGuest;
use App\Filament\Resources\Guests\Pages\EditGuest;
use App\Filament\Resources\Guests\Pages\ListGuests;
use App\Filament\Resources\Guests\RelationManagers\BookingsRelationManager;
use App\Filament\Resources\Guests\Schemas\GuestForm;
use App\Filament\Resources\Guests\Tables\GuestsTable;
use App\Models\Guest;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;
class GuestResource extends Resource
{
protected static ?string $model = Guest::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedUsers;
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
protected static ?string $modelLabel = 'Gast';
protected static ?string $pluralModelLabel = 'Gäste';
protected static ?string $recordTitleAttribute = 'last_name';
protected static ?int $navigationSort = 2;
public static function form(Schema $schema): Schema
{
return GuestForm::configure($schema);
}
public static function table(Table $table): Table
{
return GuestsTable::configure($table);
}
public static function getRelations(): array
{
return [
BookingsRelationManager::class,
];
}
public static function getPages(): array
{
return [
'index' => ListGuests::route('/'),
'create' => CreateGuest::route('/create'),
'edit' => EditGuest::route('/{record}/edit'),
];
}
}