header('Authorization'); if (empty($token)) { return $next($request); } $uid = app(AuthService::class)->decryptToken(substr($token, 7)); $u = User::find($uid); if ($u) { Auth::login($u); } return $next($request); } }