1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 21:34:03 +00:00
laravel-tips/content/tips/you-can-add-the-context-and-render-methods-to-custom-exceptions.md
2022-01-14 19:18:35 +01:00

619 B

title tweet_id thread_slug author_username images created_at slug
You can add the context() and render() methods to custom exceptions 1482036568852348928 weekly-thread-2022-02 SteveTheBauman
https://pbs.twimg.com/media/FI6OtPbXEAMoUWL.jpg
2022-01-14T17:07:07+00:00 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! 🤩