Skip to content

[13.x] Fix route name lost when RouteRegistrar action is not callable - #61285

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
KalimeroMK:fix-61282-registrar-route-name
Aug 23, 2026
Merged

taylorotwell merged 1 commit into
laravel:13.xfrom
KalimeroMK:fix-61282-registrar-route-name

Conversation

@KalimeroMK

Copy link
Copy Markdown
Contributor

Fixes #61282.

Route::name('x')->post() lost the route name for non-callable [Controller, 'method'] actions because RouteRegistrar::compileAction() used a strict callable check while RouteAction::parse() uses a syntax-only one. The parse step then rewrote the whole action array, dropping as.

Fix: use the syntax-only check in compileAction() too, so both paths normalize the action the same way. Includes a regression test.

@taylorotwell
taylorotwell merged commit 7cdebca into laravel:13.x Aug 23, 2026
56 checks passed
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.

Route name is lost when RouteRegistrar creates a route with a non-callable action

3 participants