
Import columns that map to PHP enums
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.