I'm using Crinsane/LaravelShoppingcart package.
In my controller
Cart::add($request->id, $request->name, 1, $request->price)->associate('App\Product');
I've been associated Product model
and in view, I loop through it,
now if I die and dump it it works but without dd $item->model->id doesn't work instead gives error
Trying to get property 'id' of non-object
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire