diff --git a/rental-car-backend/routes/api.php b/rental-car-backend/routes/api.php new file mode 100644 index 0000000..2e2ac7c --- /dev/null +++ b/rental-car-backend/routes/api.php @@ -0,0 +1,20 @@ +user(); +})->middleware('auth:sanctum'); +Route::get('/test', function () { + return response()->json(['message' => 'API is working']); +}); + +Route::get('cars', [CarController::class, 'index']); +Route::post('cars', [CarController::class, 'store']); +Route::get('cars/{id}', [CarController::class, 'show']); +Route::put('cars/{id}', [CarController::class, 'update']); +Route::delete('cars/{id}', [CarController::class, 'destroy']); +/* Route::middleware('auth:sanctum')->group(function () { */ +/* }); */ \ No newline at end of file