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/update", $this->getSlug()); } /** * @return string * @throws Exception */ public function getDisplayName(): string { $customer = $this->getCustomer(); return sprintf("%s - %s", $customer->name, $this->name); } }