Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); }); Route::apiResource('people', PersonController::class); Route::middleware('api')->group(function () { Route::apiResource('people', PersonController::class); }); Route::middleware('api')->group(function () { Route::get('/test', function () { return response()->json(['message' => 'API is working']); }); }); Route::get('/test', function () { return response()->json(['message' => 'API is working']); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)