name('index'); Route::prefix('flights') ->name('flights.') ->controller(FlightController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::get('/{flight}', 'show')->name('show'); }); Route::prefix('tours') ->name('tours.') ->controller(TourController::class) ->group(function () { Route::get('/', 'index')->name('index'); Route::get('/{tour}', 'show')->name('show'); }); Route::controller(CommentController::class) ->group(function () { Route::post('/flights/{flight}/comments', 'flightStore')->name('flights.comments.store'); Route::post('/tours/{tour}/comments', 'tourStore')->name('tours.comments.store'); });