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:
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....
Jump to solution
3 Replies
Solution
Andi
Andi3mo ago
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.
Andi
Andi3mo ago
For delete, remove the delete button. But I don't even think that filament creates a delete endpoint. They just call the function directly.
nanopanda
nanopanda3mo ago
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
Want results from more Discord servers?
Add your server