mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
13 lines
No EOL
584 B
Markdown
13 lines
No EOL
584 B
Markdown
---
|
|
title: 'You can use the `missing` method to customize 404 handling on a route'
|
|
tweet_id: '1512463798287814658'
|
|
thread_slug: weekly-thread-2022-14
|
|
author_username: cosmeescobedo
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FPi0WYWUYAQXuWf.jpg'
|
|
created_at: 2022-04-08T16:14:04+00:00
|
|
slug: you-can-use-the-missing-method-to-customize-404-handling-on-a-route
|
|
---
|
|
🔥 Laravel tip: Customizing Missing Model Behavior in route model bindings
|
|
|
|
By default, Laravel throws a 404 error when it can't bind the model, but you can change that behavior by passing a closure to the missing method. |