customer_id); } /** * @return Address * @throws Exception */ public function getAddress(): Address { $address = Address::get($this->address_id); return $address ?: new Address(); } public function getSlug(): string { return Util::slug("$this->name $this->id"); } /** * @return string * @throws Exception */ public function getUrl(): string { return sprintf("/locations/%s", $this->getSlug()); } }