A restaurant table map in Filament: see free tables, book them and seat the waitlist
Friday evening at a restaurant. The phone rings: "A table for two at seven?" The person at the front desk opens the reservations list in your Filament panel and starts working it out in their head. T6 is a four-top. Is anyone on it at seven? Until when? Meanwhile a party of six is waiting at the door, and the only question that matters to them is which big table frees up first.
A list of reservations answers "who is booked", but not "which table is free at seven" or "where can six people sit". A floor plan answers both at a glance.
This article shows the restaurant page of the Warp Floor demo: the dining room drawn as a plan, every table colored by whether it is free at the chosen time, booking from the plan, and a waitlist that only offers tables with enough chairs. All pictures are from the live demo.
The scene: seven o'clock on the plan
The front desk chooses a time: 19:00 to 21:00. The tables change color for that slot. Green tables are free, orange ones have a booking at some point in the slot, and gray ones are booked for all of it. The legend counts them.
Step 1: a floor page with bookable tables
The page extends Floor's FloorPage. The tables are your own DiningTable model, placed on a plan once by a manager. Their bookings are your own TableReservation model, with a normal Filament form.
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\TextInput;
use Qalainau\FilamentWarpFloor\BookingSource;
use Qalainau\FilamentWarpFloor\ElementType;
use Qalainau\FilamentWarpFloor\Floor;
public function floor(Floor $floor): Floor
{
return $floor
->plans(FloorPlan::query()->where('template', 'restaurant'))
->hourly(length: 120) // pick a time; a booking lasts two hours
->businessHours('11:00', '23:00')
->manageBookings() // move and cancel from the plan
->walkIns() // "Seat now" for guests without a booking
->elementTypes([
ElementType::make('table')
->model(DiningTable::class)
->titleAttribute('name')
->bookings(BookingSource::make(TableReservation::class)
->resource('dining_table_id')
->people('party_size')
->schema([
TextInput::make('guest_name')->required(),
TextInput::make('party_size')->integer()->minValue(1)->default(2)->required(),
DateTimePicker::make('starts_at')->seconds(false)->minutesStep(15)->required(),
DateTimePicker::make('ends_at')->seconds(false)->minutesStep(15)->after('starts_at')->required(),
])),
]);
}
hourly(length: 120) adds "Now" and "Choose a time" above the plan. The chosen day stays in the URL, so a reload or a shared link shows the same evening. Start times stay within the business hours, and moving the start keeps the length.
Step 2: click a table to see its evening
Clicking an orange table opens its day on the right: a strip of today's bookings, each booking with "Move" and "Cancel", and "Seat now (walk-in)" when it is free long enough.
Step 3: book a free table
A green table shows one button, with the chosen time already in it.
The button opens your booking form with the table and the times filled in. The front desk types the name and the number of guests.
schema(). Only the name is typed.
table_reservations table. The legend counts follow.Step 4: seat the party of six from the waitlist
Add a waitlist to the page, and parties without a booking queue up next to the plan with how long they have been waiting:
use Qalainau\FilamentWarpFloor\Waitlist;
->waitlist(Waitlist::make(WaitingParty::class)
->name('guest_name')
->people('party_size')
->schema([
TextInput::make('guest_name')->required(),
TextInput::make('party_size')->integer()->required(),
TextInput::make('phone')->tel(),
])
->fillBookingUsing(fn (WaitingParty $party): array => ['guest_name' => $party->guest_name]))
"Seat" on Fischer, a party of six, dims every table without six chairs. Only T3, T9 and T12 stay bright.
When the booking is saved, the party leaves the waitlist. onSeated() replaces that step if your waitlist should keep a history instead.
Other scenes for the same plan
- Offices: desks and meeting rooms booked by the hour, colored by who is in today.
- Parking: bays booked for a day, with the plan on a phone at the gate.
- Clinics and salons: treatment rooms and chairs, with
people()left out. - Warehouses: no bookings at all, shelves colored by stock with your own
stateUsing().
Limits worth knowing
- One booking belongs to one place. A booking that spans two tables pushed together is not shown on both.
- Overlapping bookings of the same table are refused before saving (
allowOverlap()turns that off, for shared areas). On SQLite, give the connection abusy_timeoutso that two people booking the same table at the same moment get a clean refusal instead of "database is locked". - Background images from another domain need CORS to appear in print and PNG exports.
Try it
Open the restaurant demo, press "Choose a time" and pick an evening slot. Click a green table and book it, then press "Seat" on the biggest party in the waitlist. The layouts page shows how the plan itself is drawn. No sign-up, and the data is reset every hour.