Filament: Shop Opening Times Form

Dynamic form with multiple checkboxes/dropdowns for the weekdays when the shop is opened. Also, custom table columns to show opening times.


Get the Source Code:

How it works

The main logic lives in our ShopResource method form():

  • We are using a Repeater field to create a dynamic form with multiple rows
  • We are assigning default array of items to the Repeater field
  • We are using live() fields (reactive fields) to enable/disable other fields based on the checkbox value

And for our Index, we are using a custom column Opening Times:

  • We simply create a new column
  • Pass the relationship details
  • Print rows

Working With Form


class ShopResource extends Resource
public static function form(Form $form): Form
return $form
// Simple new section to group fields
Forms\Components\Section::make('Opening Times')
// Repeater field with relationship to OpeningTime model
// ...
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 50 Premium Examples for $99 Only Form Examples for $39