Uploaded July 2025 | Updated September 2026, 1 hour ago
🚨 Unfortunately, this won't work when routes are cached.
We dive into the Laravel core and hack together a feature I’ve always wanted, route bindings that gracefully fall through if a model isn’t found. Along the way, I show how to safely extend Laravel with macros and custom validators without breaking future upgrades.
Check out Bento at: bentonow.com and be sure to sign up for my weekly newsletter at aaronfrancis.com/newsletter
Follow me:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: aaronfrancis.com - find articles, podcasts, courses, and more.
Chapters:
00:00 - What we're building: Ignore missing bindings
01:42 - The feature idea: graceful fallthrough for bindings
04:47 - Source diving into Laravel to add a macro
05:52 - Storing custom route info in the action array
06:44 - How Laravel matches routes under the hood
07:57 - Planning the safest extension approach
09:06 - Writing a custom route validator
10:48 - Hooking our validator into Laravel’s matching process
12:03 - Understanding validators in Laravel routing
14:41 - Confirming our validator works
15:55 - How to substitute route bindings safely
17:17 - Mimicking Laravel’s binding behavior
19:03 - Handling model not found exceptions cleanly
21:10 - Verifying fall-through works for unknown routes
22:56 - Final test: podcasts and episodes working together
🚨 Unfortunately, this won't work when routes are cached.
We dive into the Laravel core and hack together a feature I’ve always wanted, route bindings that gracefully fall through if a model isn’t found. Along the way, I show how to safely extend Laravel with macros and custom validators without breaking future upgrades.
Check out Bento at: bentonow.com and be sure to sign up for my weekly newsletter at aaronfrancis.com/newsletter
Follow me:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: aaronfrancis.com - find articles, podcasts, courses, and more.
Chapters:
00:00 - What we're building: Ignore missing bindings
01:42 - The feature idea: graceful fallthrough for bindings
04:47 - Source diving into Laravel to add a macro
05:52 - Storing custom route info in the action array
06:44 - How Laravel matches routes under the hood
07:57 - Planning the safest extension approach
09:06 - Writing a custom route validator
10:48 - Hooking our validator into Laravel’s matching process
12:03 - Understanding validators in Laravel routing
14:41 - Confirming our validator works
15:55 - How to substitute route bindings safely
17:17 - Mimicking Laravel’s binding behavior
19:03 - Handling model not found exceptions cleanly
21:10 - Verifying fall-through works for unknown routes
22:56 - Final test: podcasts and episodes working together










