get('/user', function (Request $request) { return $request->user(); }); Route::apiResource('users',UserController::class)->except(['create','edit','show','update','destroy']); Route::apiResource('users',UserController::class)->except(['store','index'])->middleware('auth:sanctum'); Route::post('login',[UserController::class,'login']);