[3.2.0] Unfixable ENUM export?

Hi this https://filamentphp.com/docs/3.x/actions/prebuilt-actions/export#automatically-generating-exporter-columns is unfixable? There is a workaround?
If your table contains ENUM columns, the doctrine/dbal package we use is unable to scan your table and will crash. Hence, Filament is unable to generate the columns for your exporter if it contains an ENUM column. Read more about this issue here.
If your table contains ENUM columns, the doctrine/dbal package we use is unable to scan your table and will crash. Hence, Filament is unable to generate the columns for your exporter if it contains an ENUM column. Read more about this issue here.
2 Replies
Soundmit
SoundmitOP8mo ago
i'm trying to export a model that has ENUMS but i get this error Filament\Actions\Exports\ExportColumn::getFormattedState(): Return value must be of type ?string, App\Enums\RepairStatus returned any suggestions? with this code
ExportColumn::make('repair_status')
->formatStateUsing(function (RepairStatus $status) {
return $status->value;
}),
ExportColumn::make('repair_status')
->formatStateUsing(function (RepairStatus $status) {
return $status->value;
}),
the error changes Target [App\Enums\RepairStatus] is not instantiable while building [Illuminate\Bus\ChainedBatch, Filament\Actions\Exports\Jobs\PrepareCsvExport, Filament\Actions\Exports\Jobs\ExportCsv].
Dennis Koch
Dennis Koch8mo ago
Do you maybe need to use $record with exports? Just checked the docs you linked:
which accepts the $state of the cell, and optionally the Eloquent $record:
Want results from more Discord servers?
Add your server