public function getImageAttribute() { if ($this->thumbnail and $this->thumbnail->attachment) { return $this->thumbnail->attachment->guid; } }