F
Filament2mo ago
MZX

Format boolean columns in exporter?

Instead of 1 and 0 I want it to bes Yes or No in the csv/xslx file.
ExportColumn::make('is_late')
->formatStateUsing(fn ($state) => $state ? 'Yes' : 'No')
->label('Late'),
ExportColumn::make('is_late')
->formatStateUsing(fn ($state) => $state ? 'Yes' : 'No')
->label('Late'),
This is what I did, but doesn't work.
Solution:
Yeah there's some weird bugs with the exporter. Cleaning the cache and jobs table fixes it.
Jump to solution
2 Replies
krekas
krekas2mo ago
Just tried it the same way as you did and it works for me. Also, it didn't matter if column is casted to bool or not
Solution
MZX
MZX2mo ago
Yeah there's some weird bugs with the exporter. Cleaning the cache and jobs table fixes it.
Want results from more Discord servers?
Add your server