Disable some CRUD actions
If I want to disable edit and delete, so that routes like
GET /admin/{model}/1/edit
and POST /livewire/update
cant even be accessed.
How do you do that?Solution:Jump to solution
Just remove the routes and pages in your specific resource.
You won't be able to remove livewire/update as filament is built on livewire and therefore needs that endpoint to be able to work at all....
3 Replies
Solution
Just remove the routes and pages in your specific resource.
You won't be able to remove livewire/update as filament is built on livewire and therefore needs that endpoint to be able to work at all.
For delete, remove the delete button. But I don't even think that filament creates a delete endpoint. They just call the function directly.
You can also create a Policy for your Model and Filament will automatically hide or disable corresponding UI controls. Check out the #bezhansalleh-shield plugin