Merge pull request #372 from jmarkese/newlogix

Update CartItem.php
This commit is contained in:
Rob Gloudemans
2017-08-23 06:47:20 +02:00
committed by GitHub

View File

@@ -274,7 +274,7 @@ class CartItem implements Arrayable, Jsonable
return $this->tax * $this->qty;
}
if($attribute === 'model') {
if($attribute === 'model' && isset($this->associatedModel)) {
return with(new $this->associatedModel)->find($this->id);
}