Export action with Enum column
Hello, do you know if it's possible to export table when column is type Enum. Thanks
Solution
Hello, You can export table with enum column.
- Add cast to you model:protected function casts(): array { return [ 'identification_type' => IdentificationTypeEnum::class, ]; }
- Modify state enum column:ExportColumn::make('identification_type') ->label(__('resources.customer.labels.identification_type')) ->state(fn($record) => $record->identification_type->getLabel()),