Import columns that map to PHP enums

Import columns that map to PHP enums

  • action
  • import
PR #20482 by @MadBox-99

Adding ->enum() on an import column will:

  • fill the example CSV with valid cases (so the user can see which values are accepted, passing ->examples() overrides this)
  • validate every uploaded row against that enum, including multi-value columns.
ImportColumn::make('status')
    ->enum(OrderStatus::class);
  • Invalid rows fail cleanly instead of reaching the model's cast and throwing a ValueError.
  • Blank optional cells stay allowed unless you add required.
All Filament Up To Date tips