You can add the context() and render() methods to custom exceptions

You can add the context() and render() methods to custom exceptions

If you're creating custom exceptions inside your Laravel application, you can add a "context()" method to provide additional data to be printed in the log, as well as a "render()" method to allow the exception to display its own view to the user. Super cool! 🤩

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