orwhere('service_number','like','%'.$term.'%') ->orWhere('service_address','like','%'.$term.'%'); } /* ATTRIBUTES */ /** * Return the service address * * @return string */ public function getServiceDescriptionAttribute(): string { return $this->service_address ?: 'VOIP'; } public function getServiceExpireAttribute(): Carbon { // TODO: Implement getServiceExpireAttribute() method. } /** * Return the service number * * @return string */ public function getServiceNameAttribute(): string { return $this->service_number ?: ($this->service_address ?: 'Unknown'); } /* METHODS */ public function inContract(): bool { return $this->service_contract_date AND $this->service_contract_date->addMonths($this->contract_term)->isFuture(); } }