mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
11 lines
No EOL
619 B
Markdown
11 lines
No EOL
619 B
Markdown
---
|
|
title: 'You can add the context() and render() methods to custom exceptions'
|
|
tweet_id: '1482036568852348928'
|
|
thread_slug: weekly-thread-2022-02
|
|
author_username: SteveTheBauman
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FI6OtPbXEAMoUWL.jpg'
|
|
created_at: 2022-01-14T17:07:07+00:00
|
|
slug: 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! 🤩 |