Skip to content

[12.x] Use more specific route binding exception message for child routes #56298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jessekoerhuis
Copy link
Contributor

While viewing the Illuminate\Http\Resources\DelegatesToResource trait, I noticed that both resolveRouteBinding and resolveChildRouteBinding currently throw identical exception messages.

To reduce confusion and to make it easier to distinguish between the two, this PR updates the message in resolveChildRouteBinding to explicitly mention that the error originated from child route bindings.

@jessekoerhuis jessekoerhuis changed the title [12.x] Use clearer route binding exceptions [12.x] Use more specific route binding exception message for child route binding Jul 15, 2025
@jessekoerhuis jessekoerhuis changed the title [12.x] Use more specific route binding exception message for child route binding [12.x] Use more specific route binding exception message for child routes Jul 15, 2025
@taylorotwell taylorotwell merged commit 03469f2 into laravel:12.x Jul 15, 2025
62 checks passed
@jessekoerhuis jessekoerhuis deleted the use-clearer-route-binding-exceptions branch July 16, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants