src/Leevel/Http/Request.php
public function input(?string $key = null, $defaults = null)
    {
        $input = $this->getInputSource()->all() + $this->query->all();

        if (null === $key) {
            return $input;
        }

        return $input[$key] ?? $defaults;
    }
public function input(?string $key = null, $defaults = null)
    {
        $input = $this->getInputSource()->all() + $this->query->all();

        if (null === $key) {
            return $input;
        }

        return $input[$key] ?? $defaults;
    }
获取输入数据.

@param string            $key
@param null|array|string $defaults

@return mixed