yii\web\Request::getQueryParam PHP Method

getQueryParam() public method

If the GET parameter does not exist, the second parameter passed to this method will be returned.
See also: getBodyParam()
public getQueryParam ( string $name, mixed $defaultValue = null ) : mixed
$name string the GET parameter name.
$defaultValue mixed the default parameter value if the GET parameter does not exist.
return mixed the GET parameter value
    public function getQueryParam($name, $defaultValue = null)
    {
        $params = $this->getQueryParams();
        return isset($params[$name]) ? $params[$name] : $defaultValue;
    }