Laravel Tip: You can customize how your exceptions are rendered by adding a 'render' method to your exception.
For example, this allows you to return JSON instead of a Blade view when the request expects JSON.
We're writing a book, you can get it for free here.
We're writing a book! Join the early access to get it for free.