/**
  * @method validate 
  * @use validates Profile fields
  */
 protected function validate()
 {
     if (!$this->business || !$this->phone || !$this->address || !$this->city || !$this->state || !$this->zip || !$this->country_code || !$this->username || !empty($this->website) && Url::isValid($this->website) === false) {
         throw new Exceptions\ProfileValidationFailed();
     }
     return true;
 }
Exemple #2
0
 /**
  * 
  * @param string $url
  * @return string
  */
 public static function removeParams($url = null)
 {
     return Url::clean(strtok($url, '?'), false);
 }