Calling user method on file upload? #73
-
I have a trait that handles avatar uploading for users, with the only parameter being the file request object. This method generates all the different sizes etc and the front-end has it as a controller, obviously no issues here. Would it be possible to somehow call this method in Filament? Could I create a custom page within Filament for the sole purpose of updating a users' avatar and insert it as a tab in the User Edit page? That's the only real potential solution I can think of right now, not sure whether it would really work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Update:: A page on the resource did the trick. As a page resource is a livewire component, that was straightforward to do. Now I need to somehow add the link to the page on the Users Resource table and add toast notifications when the avatar has been updated. |
Beta Was this translation helpful? Give feedback.
Update:: A page on the resource did the trick. As a page resource is a livewire component, that was straightforward to do.
Now I need to somehow add the link to the page on the Users Resource table and add toast notifications when the avatar has been updated.