feat:add routes for flights and tours

This commit is contained in:
2026-08-17 13:08:26 +03:30
parent 2d4269e45a
commit b4048292da
+26
View File
@@ -1,7 +1,33 @@
<?php <?php
use App\Http\Controllers\CommentController;
use App\Http\Controllers\FlightController;
use App\Http\Controllers\IndexController; use App\Http\Controllers\IndexController;
use App\Http\Controllers\TourController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::get('/', [IndexController::class, 'index'])->name('index'); Route::get('/', [IndexController::class, 'index'])->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');
});