phone == null || $this->phone == "" || strlen( $this->phone) < self::CHARACTER_LENGTH){ return null ; } if($this->phone_code){ $response = strpos($this->phone_code, '+') === false ? '+'.$this->phone_code.$this->phone : $this->phone_code.$this->phone; }else{ $response = strpos($this->phone, '+') === false ? '+'.$this->phone : $this->phone; } return $response; } catch (Exception $e) { return null; } } public function getViewFullMobileAttribute() { try { $response = null ; if($this->mobile == null || $this->mobile == "" || strlen( $this->mobile) < self::CHARACTER_LENGTH){ return null ; } if($this->mobile_code){ $response = strpos($this->mobile_code, '+') === false ? '+'.$this->mobile_code.$this->mobile : $this->mobile_code.$this->mobile; }else{ $response = strpos($this->mobile, '+') === false ? '+'.$this->mobile : $this->mobile; } return $response; } catch (Exception $e) { return null; } } public function getViewFullFaxAttribute() { try { $response = null ; if($this->fax == null || $this->fax == "" || strlen( $this->fax) < self::CHARACTER_LENGTH){ return null ; } if($this->fax_code){ $response = strpos($this->fax_code, '+') === false ? '+'.$this->fax_code.$this->fax : $this->fax_code.$this->fax; }else{ $response = strpos($this->fax, '+') === false ? '+'.$this->fax : $this->fax; } return $response; } catch (Exception $e) { return null; } } public function executiveType() { return $this->hasOne('App\Models\PropertyExecutiveType','id', 'executive_type_id')->select('id', 'name', 'language_key', 'icon'); } /*public function PropertyContentCategories() { return $this->hasMany('App\Models\PropertyContentCategory','id'); }*/ }