check()) { $user = Auth::guard($guard)->user()->name; return response()->json([ 'message' => 'authenticated', 'name' => $user, ], 200); } } return $next($request); } }