Joint cast between create and update

Hello, I would like format the value of my lastname input in uppercase when created and updated. Is there a way to do it only one time or should I do it with the both lifecycle hook ?
5 Replies
LeandroFerreira
->dehydrateStateUsing(fn (string $state): string => str($state)->upper())
->dehydrateStateUsing(fn (string $state): string => str($state)->upper())
?
Frédéric
Frédéric2w ago
Thx it's exacly that ! But When I update I need to refresh the page to see it. Can I update the value of my input ?
LeandroFerreira
in EditPage?
Frédéric
Frédéric2w ago
That's work thx !!!
Want results from more Discord servers?
Add your server
More Posts
How to create and edit multi-site content in Filament 3?Hi all! I'm migrating an existing database to Filament, and I run into tables the have (among othersHow to Programmatically Navigate to a Specific Step in a WizardHow can I programmatically navigate to step 2 ("Delivery") using a function call or dispatch in LiveHow to get selected records in PDF using filament 3if there are 100 records from that few selected records pdf i need how to make that possible in filaStraw Poll - migration\merge or rebuild ?I have bee experimenting with filament on some elements of an extensive existing SAAS product. MainlAdd filament form in Livewire componenti create a filament form in livewire component and call that form in the way {{$this->form}}. in loHow to include a different resource CreateAction in resource CreateAction?Hello. I try to add a helper text on an select component with relationship to users. I want that to How can I stream text/strings to the browser?Hey folks, I would like to return a streamed response from a Symfony Process (Laravel Process FacadformatStateUsing method in TextColumn is not working at the custom pageWhy my formatStateUsing method in TextColumn is not working at the custom page. I try debugging theHow Can I Stop the Relationship from Auto-Saving After Submitting the FormHello everyone, basically I just want to retrieve the data from a form and save it as a JSON object How to get State of SelectConstraintsSelectConstraint::make('contactEvents.status') ->options([