This project demonstrates three Filament features:
First, I will explain the dynamic form, and then, how to use that form as a public form, outside of the admin panel.
When you log in as admin, you can create an appointment: choose the track and the form will show the radio buttons of available timeslots that are not taken yet.
This is done in the file app/Filament/Resources/ReservationResource.php
DatePicker::make('date') ->live(),Radio::make('track') ->options(fn (Get $get) => (new ReservationService())->getAvailableTimesForDate($get('date'))) ->hidden(fn (Get $get) => ! $get('date'))
The code means the reactive "live" behavior of the DatePicker
input, with Radio
options being queried from the...