mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user