ChrisHardie
ChrisHardie
FFilament
Created by ChrisHardie on 5/3/2024 in #❓┊help
Re-using a custom action on both a form and a table
I have a custom action that performs an operation on a single model and displays a notification. If it extends Filament\Tables\Actions\Action then it works fine on a table record row, and if it extends Filament\Actions\Action then it works fine on a model resource page header, but so far I haven't figured out how to have it work on both. Is this possible?
6 replies
FFilament
Created by ChrisHardie on 3/24/2024 in #❓┊help
Formatting dates returned in multi-relationship table column?
I have a table column that references a many-to-many relationship field, and I want to display a formatted version of a date field/attribute on the related models that are returned. Right now the column state comes as a comma-separated list of whatever default Carbon formatting is in place. Before I go down the road of splitting out those text values in $state so I can re-parse and re-format them (!), is there a better way to format the individual values of relationships returned? Thanks.
4 replies