Files
fewo-stommer/app/Filament/Resources/Photos/PhotoResource.php
T
LarsandClaude Opus 5.5 8bcda9a4bc Wohnungsumschalter im Verwaltungsmenue und wohnungsbezogene Listen
Oben im Seitenmenue waehlt man die Wohnung; Listen, neue Eintraege, Belegungsplan
und Preise & Angebote folgen ihr. Ein geoeffneter Eintrag einer anderen Wohnung
schaltet auf diese um. Galerie und Ersatz-Titelbild der Website zeigen nur Fotos
der Wohnung des Bausteins und Fotos ohne Wohnung.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:40:13 +01:00

62 lines
1.6 KiB
PHP

<?php
namespace App\Filament\Resources\Photos;
use App\Filament\Concerns\FollowsAdminMode;
use App\Filament\Concerns\SelectsRecordProperty;
use App\Filament\Resources\Photos\Pages\CreatePhoto;
use App\Filament\Resources\Photos\Pages\EditPhoto;
use App\Filament\Resources\Photos\Pages\ListPhotos;
use App\Filament\Resources\Photos\Schemas\PhotoForm;
use App\Filament\Resources\Photos\Tables\PhotosTable;
use App\Models\Photo;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;
class PhotoResource extends Resource
{
use FollowsAdminMode, SelectsRecordProperty;
protected static ?string $model = Photo::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedPhoto;
protected static string|UnitEnum|null $navigationGroup = 'Webseite';
protected static ?string $modelLabel = 'Bild';
protected static ?string $pluralModelLabel = 'Bilder';
protected static ?int $navigationSort = 2;
public static function form(Schema $schema): Schema
{
return PhotoForm::configure($schema);
}
public static function table(Table $table): Table
{
return PhotosTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListPhotos::route('/'),
'create' => CreatePhoto::route('/create'),
'edit' => EditPhoto::route('/{record}/edit'),
];
}
}