mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
Weekly thread #46
This commit is contained in:
parent
32273f8c67
commit
eb4637f334
17 changed files with 189 additions and 0 deletions
13
content/tips/create-renderable-exceptions.md
Normal file
13
content/tips/create-renderable-exceptions.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: 'Create renderable exceptions'
|
||||
tweet_id: '1461703839388626946'
|
||||
thread_slug: weekly-thread-2021-46
|
||||
author_username: Philo01
|
||||
images:
|
||||
- 'https://pbs.twimg.com/media/FEewo1NXMAgaMbb.jpg'
|
||||
created_at: 2021-11-19T14:32:07+00:00
|
||||
slug: create-renderable-exceptions
|
||||
---
|
||||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue