If it starts with number, then in Vue Component when I try to get routes, it starts with a "0" route. The object containing routes look like this:
Then function route().current() on every route return "0".
When I change route name to:
Route::fallback(function () { return response()->view('pages.page-404', ['notfoundPage' => true], 404); })->name('error.404')->middleware('getlocale');
Ziggy version
v1.6.0
Laravel version
v9.52.10
Description
Hello!
There is a problem with ziggy when route name starts with a number eg. 404.
Route::fallback(function () { return response()->view('pages.page-404', ['notfoundPage' => true], 404); })->name('404')->middleware('getlocale');
If it starts with number, then in Vue Component when I try to get routes, it starts with a "0" route. The object containing routes look like this:
Then function route().current() on every route return "0".
When I change route name to:
Route::fallback(function () { return response()->view('pages.page-404', ['notfoundPage' => true], 404); })->name('error.404')->middleware('getlocale');
Then It's working as expected.
Ziggy call and context
Ziggy configuration
Route definition