belongsTo(ProductProxy::modelClass()); } /** * Get image url for the product image. * * @return string */ public function url() { return Storage::url($this->path); } /** * Get image url for the product image. * * @return string */ public function getUrlAttribute() { return $this->url(); } /** * Is custom attribute. * * @param string $attribute * @return bool */ public function isCustomAttribute($attribute) { return $this->attribute_family->custom_attributes->pluck('code')->contains($attribute); } }