In a table display custom text when column is null. Works on v2 but not on v3.
This works on v2 but not on v3, any suggestions, please?
On Filament v2
When the column 'marked_ready_at' does not yet have a date (is null) it shows 'Not yet'. Otherwise, it shows the date in a human-friendly way.
On Filament v3
It doesn't work.
Model
Filament resource
Does anyone have the update or perhaps a better approach to achieve it?
PHP v8.2
Thank you.
3 Replies
you can use
->default('Not yet')
Hi, Implementing '->default('Not yet')' I get the following error:
Could not parse 'Not yet': Failed to parse time string (Not yet) at position 0 (N): The timezone could not be found in the database
so I guess you have to ditch the
datetime()
and do it like this
dont like too, π maybe use accessor?!