belongsTo(Album::class); } public function thumbnailUrl($thumbnailName = null) { return $this->album->getAlbumSource()->getUrlToPhoto($this, $thumbnailName); } public function url() { return route('viewPhoto', [ 'albumUrlAlias' => $this->album->url_alias, 'photoFilename' => $this->storage_file_name ]); } }