think\Paginator::appends PHP Method

appends() public method

添加URL参数
public appends ( array | string $key, string | null $value = null )
$key array | string
$value string | null
    public function appends($key, $value = null)
    {
        if (!is_array($key)) {
            $queries = [$key => $value];
        } else {
            $queries = $key;
        }
        foreach ($queries as $k => $v) {
            if ($k !== $this->options['var_page']) {
                $this->options['query'][$k] = $v;
            }
        }
        return $this;
    }