lundi 23 avril 2018

Laravel shopping cart package Model Associate issue

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



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HoyOW3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire