47 lines
1.8 KiB
PHP
47 lines
1.8 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Account\EditProfileController;
|
|
use App\Http\Controllers\Account\ProfileController;
|
|
use App\Http\Controllers\BookingController;
|
|
use App\Http\Controllers\FlightController;
|
|
use App\Http\Controllers\IndexController;
|
|
use App\Http\Controllers\TourController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/', [IndexController::class, 'index'])->name('index');
|
|
|
|
Route::prefix('flights')->controller(FlightController::class)->name('flights.')->group(function () {
|
|
Route::get('/', 'index')->name('index');
|
|
|
|
Route::prefix('{flight}')->group(function () {
|
|
Route::get('/', 'show')->name('show');
|
|
Route::post('/comment', 'commentStore')->name('comments.store');
|
|
|
|
Route::post('/booking', [BookingController::class, 'store'])->name('booking.store');
|
|
});
|
|
});
|
|
|
|
Route::prefix('tours')->controller(TourController::class)->name('tours.')->group(function () {
|
|
Route::get('/', 'index')->name('index');
|
|
Route::prefix('{tour}')->group(function () {
|
|
Route::get('/', 'show')->name('show');
|
|
Route::post('/comment', 'commentStore')->name('comments.store');
|
|
Route::post('/booking', [BookingController::class, 'store'])->name('booking.store');
|
|
});
|
|
});
|
|
|
|
|
|
Route::prefix('account')->name('accounts.')->middleware('auth')->group(function () {
|
|
Route::controller(ProfileController::class)->group(function () {
|
|
Route::get('/profile', 'index')->name('profile');
|
|
Route::get('/get-cities/{province_id}', 'getCities')->name('get-cities');
|
|
});
|
|
|
|
Route::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () {
|
|
Route::get('/', 'index')->name('index');
|
|
Route::post('/', 'update')->name('update');
|
|
Route::post('change-password', 'changePassword')->name('change-password');
|
|
});
|
|
|
|
});
|