diff --git a/rental-car-backend/routes/api.php b/rental-car-backend/routes/api.php index 2e2ac7c..6190d96 100644 --- a/rental-car-backend/routes/api.php +++ b/rental-car-backend/routes/api.php @@ -16,5 +16,17 @@ Route::get('cars/{id}', [CarController::class, 'show']); Route::put('cars/{id}', [CarController::class, 'update']); Route::delete('cars/{id}', [CarController::class, 'destroy']); + +use App\Http\Controllers\Api\ReservationController; + +// API routes for reservations +Route::prefix('reservations')->group(function () { + Route::get('/', [ReservationController::class, 'index']); // List all reservations + Route::post('/', [ReservationController::class, 'store']); // Create a new reservation + Route::get('/{reservation}', [ReservationController::class, 'show']); // Show a specific reservation + Route::put('/{reservation}', [ReservationController::class, 'update']); // Update a specific reservation + Route::delete('/{reservation}', [ReservationController::class, 'destroy']); // Delete a specific reservation +}); + /* Route::middleware('auth:sanctum')->group(function () { */ /* }); */ \ No newline at end of file