Fixed belongsToMany relations eager loading issue
This commit is contained in:
parent
2336790ffc
commit
9bc38e631f
|
|
@ -321,7 +321,7 @@ class Product extends Model implements ProductContract
|
|||
public function getAttribute($key)
|
||||
{
|
||||
if (! method_exists(static::class, $key)
|
||||
&& ! in_array($key, ['parent_id', 'attribute_family_id'])
|
||||
&& ! in_array($key, ['pivot', 'parent_id', 'attribute_family_id'])
|
||||
&& ! isset($this->attributes[$key])
|
||||
) {
|
||||
if (isset($this->id)) {
|
||||
|
|
@ -438,4 +438,4 @@ class Product extends Model implements ProductContract
|
|||
{
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue