Files
fewo-stommer/app/Filament/Resources/Amenities/Schemas/AmenityForm.php
T
Lars StommerandClaude Opus 5.5 bb7eb62782 Inhaltsverwaltung: Bilder, Webseiten-Texte, Ausstattung, FAQ, Hinweis-Banner
- Bilder mit automatischen WebP-Webgrößen (640/1280/2048 px), Sortierung per Drag & Drop, Mehrfach-Upload, Import-Befehl photos:import
- Webseiten-Texte als feste, bearbeitbare Bausteine (config/content.php), Rich-Text bereinigt ausgegeben
- Ausstattung und FAQ aus der bisherigen Webseite übernommen
- Rolle Inhalte hat Zugriff auf alle Webseiten-Bereiche

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

38 lines
1.2 KiB
PHP

<?php
namespace App\Filament\Resources\Amenities\Schemas;
use App\Enums\AmenityArea;
use App\Models\Property;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
class AmenityForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->columns(2)
->components([
TextInput::make('name')
->label('Ausstattung')
->placeholder('z. B. Geschirrspüler')
->required()
->maxLength(255),
Select::make('area')
->label('Bereich')
->options(AmenityArea::class)
->required(),
Select::make('property_id')
->label('Wohnung')
->options(fn (): array => Property::query()->pluck('name', 'id')->all())
->default(fn (): ?int => Property::query()->value('id'))
->required(),
Toggle::make('is_highlight')
->label('Highlight (auf der Startseite hervorheben)'),
]);
}
}