public function url($url)
    {
        if ($this->isNotSetOrEmpty($url)) {
            throw CouldNotCreateButton::urlNotProvided();
        } elseif (! filter_var($url, FILTER_VALIDATE_URL)) {
            throw CouldNotCreateButton::invalidUrlProvided($url);
        }

        $this->payload['url'] = $url;
        $this->isTypeWebUrl();

        return $this;
    }
public function url($url)
    {
        if ($this->isNotSetOrEmpty($url)) {
            throw CouldNotCreateButton::urlNotProvided();
        } elseif (! filter_var($url, FILTER_VALIDATE_URL)) {
            throw CouldNotCreateButton::invalidUrlProvided($url);
        }

        $this->payload['url'] = $url;
        $this->isTypeWebUrl();

        return $this;
    }
public function url ( $ url ) { if ( $ this -> isNotSetOrEmpty ( $ url ) ) { throw CouldNotCreateButton :: urlNotProvided ( ) ; } elseif ( ! filter_var ( $ url , FILTER_VALIDATE_URL ) ) { throw CouldNotCreateButton :: invalidUrlProvided ( $ url ) ; } $ this -> payload [ 'url' ] = $ url ; $ this -> isTypeWebUrl ( ) ; return $ this ; }
Set a URL for the button.

@param $url

@return $this
@throws CouldNotCreateButton
Set a URL for the button .