Faridleo
Export action with Enum column
Hello, You can export table with enum column.
1. Add cast to you model:
protected function casts(): array
{
return [
'identification_type' => IdentificationTypeEnum::class,
];
}
2. Modify state enum column:
ExportColumn::make('identification_type')
->label(__('resources.customer.labels.identification_type'))
->state(fn($record) => $record->identification_type->getLabel()),
4 replies