public static function create($claimsKey, $claimsValue = null) { $claims = Claims::set($claimsKey, $claimsValue); // 权利声明 $key = config('jwt.key'); // 密钥 $alg = config('jwt.alg') ? config('jwt.alg') : 'HS256'; // 算法 $token = JWT::encode($claims, $key, $alg); // 编码 return $token; }