how simple way to, to delete file/image storage
delete image storage when click action button, Update or delete in table resource
4 Replies
or intercept when click submit update or delete in table action, to delete storage image.
One simple way is an Action button. In the docs there's this example which is for deleting a record, but you could modify the action() to lookup the file and delete it. https://filamentphp.com/docs/3.x/actions/modals#confirmation-modals
I use observer, this link is very helpful https://laraveldaily.com/post/filament-laravel-delete-unused-files-model-updated-deleted
ok