diff --git a/composer.json b/composer.json index 6ba7a0b..920b0ca 100644 --- a/composer.json +++ b/composer.json @@ -16,9 +16,9 @@ ], "require": { "php": "^7.4|^8.0", - "tipoff/authorization": "^2.8.6", - "tipoff/locations": "^2.12.0", - "tipoff/support": "^2.1.5" + "tipoff/authorization": "^2.10.0", + "tipoff/locations": "^2.14.1", + "tipoff/support": "^2.2.0" }, "require-dev": { "tipoff/test-support": "^2.0.1" diff --git a/src/Models/EscaperoomTheme.php b/src/Models/EscaperoomTheme.php index 46090f4..1faf406 100644 --- a/src/Models/EscaperoomTheme.php +++ b/src/Models/EscaperoomTheme.php @@ -68,7 +68,7 @@ public function image() { return $this->belongsTo(app('image')); } - + public function image_theme() { return $this->belongsToMany(app('image'), 'image_theme', 'escaperoom_theme_id', 'image_id'); @@ -123,12 +123,12 @@ public function getPitchAttribute() public function getIconUrlAttribute() { - return $this->icon->url; + return $this->icon->url ?? null; } public function getYoutubeAttribute() { - if ($this->video->source == 'youtube') { + if (isset($this->video) && $this->video->source == 'youtube') { return $this->video->identifier; }