I am working on a business listing website and using following routes working fine
- Route::get(‘/’, [HomeController::class, ‘index’])->name(‘home’);
- Route::get(‘/country/{country}’, [CountryController::class, ‘index’]);
- Route::get(‘/cuisine/{cuisineSlug}’, [CuisineController::class, ‘cuisine’]);
- Route::get(‘/food/{food}’, [FoodController::class, ‘index’]);
these redirects to home page or show 404 error
- Route::get(‘/{country}/{state}’, [StateController::class, ‘index’]);
- Route::get(‘/{city}/{restaurant}’, [RestaurantController::class, ‘index’]);
- Route::get(‘/{city}/{restaurantCategory}’, [CityRestaurantCategoryController::class, ‘index’]);
- Route::get(‘/{city}/{foodCategory}’, [CityFoodCategoryController::class, ‘index’]);
is there a way I can bind them, so that Laravel don’t get confused that which parameter it belongs to.