Set all column titles to headline()
Hi- I have lots of two-word column names, and I'd prefer table columns to use headline case, eg "Created At" rather than the default which winds up as "Created at". I know I could set an explicitly-cased title for each one, but I would much prefer that as the default.
Is there any place I can override getLabel() for my project? This tweak solves it:
4 Replies
I see that a prior post here has made a similar change to resource titles. [https://github.com/filamentphp/filament/pull/3873]
I would be happy to make a similar PR for this change if people agree this would be a preferable default!
A PR for this wouldn’t get merge in my opinion. If you need to do something globally see https://filamentphp.com/docs/3.x/tables/columns/getting-started#global-settings
Ahh thank you - a global setting will go a long way toward solving this for me. I'll try this now.
This framework continues to amaze. That suggestion worked perfectly, thanks again. Full context in case it helps anyone else:
The casing change even applied in the panel's TableWidget, and does not interfere with any explicitly set titles.
Tacking on to my own old question since I've wound up adding the same tweak to form field names: