diff --git a/app/Http/Controllers/Account/WishlistController.php b/app/Http/Controllers/Account/WishlistController.php new file mode 100644 index 0000000..2eba513 --- /dev/null +++ b/app/Http/Controllers/Account/WishlistController.php @@ -0,0 +1,11 @@ +user(); + } + return $user->first_name . ' ' . $user->last_name; + } +} diff --git a/composer.json b/composer.json index 9c6bcc0..e80c309 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,10 @@ "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" - } + }, + "files": [ + "app/helpers/helpers.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/routes/web.php b/routes/web.php index 9c9a7bd..f7376fc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,26 +1,48 @@ 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::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::get('/', 'index')->name('index'); + Route::get('{tour}', 'show')->name('show'); +}); Route::controller(CommentController::class)->group(function () { - Route::post('flights/{flight}/comments', 'storeFlight')->name('flights.comments'); - Route::post('tours/{tour}/comments', 'storeTour')->name('tours.comments'); - }); + + Route::post('flights/{flight}/comments', 'storeFlight')->name('flights.comments'); + Route::post('tours/{tour}/comments', 'storeTour')->name('tours.comments'); + +}); + +Route::prefix('account')->name('account.')->middleware('auth')->group(function () { + + Route::get('profile', [ProfileController::class, 'index'])->name('profile'); + + Route::get('booking', [BookingController::class, 'index'])->name('booking'); + + Route::get('wishlist', [WishlistController::class, 'index'])->name('wishlist'); + + Route::prefix('edit-profile')->name('edit-profile.')->controller(EditProfileController::class)->group(function () { + + Route::get('/', 'index')->name('index'); + Route::post('/', 'post')->name('post'); + + }); +});