HTTP response status can be customized when denying actions via Gates & Policies

HTTP response status can be customized when denying actions via Gates & Policies

🔐🧵 I added a small, but pretty nice, security enhancement in Laravel v9.20.0

When denying actions via Gates & Policies in Laravel, you can now customise the HTTP response status that is returned

This allows you to deny access, while hiding the existence of your resources.

We're writing a book, you can get it for free here.