json(['error' => 'User not found'], 404); } return response()->json($user); } }