Here are the relevant routes:
Auth::routes();
Route::group(['prefix' => 'admin'], function () {
Voyager::routes();
});
Route::get('/', [
'as' => 'home',
'uses' => 'BusinessController@categories'
]);
Route::get('/{category}', [
'as' => 'business.category',
'uses' => 'BusinessController@cities'
]);
Route::get('/{category}/{state}/{city}', [
'as' => 'business.city',
'uses' => 'BusinessController@listings'
]);
Whenever I try to use the Voyager Administration panel and navigate to any route with three parameters (i.e. /admin/users/2/, admin/posts/1, admin/media/1) the route matches to the business.city route. This happens regardless of if I place the voyager routes above or below the BusinessController routes. I don't want to place the business.city route into a group because it would make the URI a bit longer and less intuitive.
I would think it would try and match the admin prefixed routes before it went with the wildcard route but I guess it doesn't.
What's the best solution to this issue?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community