Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Giant_IT_Guy's avatar

Laravel wayfinder doesnt generate all routes

Dear guys,

If I have something like this:

Route::middleware(['auth', CentralOnly::class])->group(function () {
    Route::get('dashboard',            [DashboardController::class, 'index'])->name('central.dashboard');
});

Route::middleware(['auth', TenantOnly::class])->group(function () {
    Route::get('dashboard',            [TenantDashboardController::class, 'index'])->name('app.dashboard');
});

Wayfinder generates only lates one with same route, doesn't even look at naming side/middlewares etc.

Is there a way to override that or am I forced to handle those things inside controller itself if I want same route path?

0 likes
1 reply
Glukinho's avatar

How these two routes differ? They both have verb GET and point to /dashboard URL, different middlewares, route names and controllers are unimportant.

Can you show php artisan route:list?

Please or to participate in this conversation.