Files
hatame.andarza09/routes/web.php
T

40 lines
1.4 KiB
PHP

<?php
use App\Http\Controllers\CityController;
use App\Http\Controllers\CommentController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\FavoriteController;
use App\Http\Controllers\FlightController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
Route::get('/', [HomeController::class,'index'])
->name('index');
Route::get('/flights/search', [FlightController::class, 'search'])
->name('flights.search');
Route::get('/flights/archive', [FlightController::class, 'archive'])
->name('flights.archive');
Route::prefix('users')->name('users.')->middleware('auth:web')->group(function (){
Route::get('/',[DashboardController::class,'index'])->name('dashboard');
Route::get('/profile/edit',[ProfileController::class,'edite'])->name('profile.edit');
Route::put('/profile/update',[ProfileController::class,'update'])->name('profile.update');
Route::get('/favorite',[FavoriteController::class,'index'])->name('favorite.index');
Route::post('favorite',[FavoriteController::class,'store'])->name('favorite.store');
Route::delete('/favorite/{favorite}',[FavoriteController::class,'destroy'])->name('favorite.destroy');
Route::get('/comments',[CommentController::class,'index'])->name('comments.index');
Route::get('/cities/{province}', [CityController::class, 'getCities'])
->name('cities.by.province');
});