diff --git a/composer.json b/composer.json index 59d549f..eb854c5 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,9 @@ "php": "^7.4|^8.0", "drewroberts/blog": "^4.5.4", "sixlive/nova-text-copy-field": "^1.5", - "tipoff/authorization": "^2.8.6", - "tipoff/support": "^2.1.5", - "tipoff/laravel-google-api": "^2.1.1" + "tipoff/authorization": "^2.9.0", + "tipoff/support": "^2.2.0", + "tipoff/laravel-google-api": "^2.1.3" }, "require-dev": { "tipoff/test-support": "^2.0.1" diff --git a/src/Models/Location.php b/src/Models/Location.php index c97a5d7..2e5a27d 100644 --- a/src/Models/Location.php +++ b/src/Models/Location.php @@ -203,6 +203,15 @@ public function slots() return $this->hasManyThrough(app('slot'), app('room')); } + public function getBookingsPathAttribute() + { + if ($this->market->locations_count === 1) { + return "/{$this->market->slug}/book-online"; + } + + return "/{$this->market->slug}/book-online/{$this->slug}"; + } + public function getSelectorTitleAttribute() { if ($this->market->locations_count > 1) { @@ -220,11 +229,11 @@ public function getContactEmailAddressAttribute() public function getStreetAddressAttribute() { $add2 = ''; - if ($this->address()->address_line_2) { - $add2 = ' ' . $this->address()->address_line_2; + if ($this->address->address_line_2) { + $add2 = ' ' . $this->address->address_line_2; } - return "{$this->address()->address_line_1}{$add2}"; + return "{$this->address->address_line_1}{$add2}"; } public function getFullAddressAttribute()