Encrypted cast doesn't load into inputs when using $hidden cast.
Since this is sensitive information, I don't want to accidentally leak it somewhere in payload on the front facing application hence I put those values into $hidden. But now I have and issue with it, when using Filament as admin, I want to make exception here and still load this data.
What would be proper way to handle this?
3 Replies
You can use
mutateDataBeforeFill()
to fill the missing data manually:
https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-data-before-filling-the-formif you have isAdmin method in user model, you can do like following:
extremely useful to know, thank you