darryldecode / laravelshoppingcart

Shopping Cart Implementation for Laravel Framework
1.33k stars 436 forks source link

Associate Cart to a Model #257

Open smaqeelkazmi opened 4 years ago

smaqeelkazmi commented 4 years ago

Using this package with Laravel 5.8:

I'm looking for a solution that how I can relate the whole Cart with a Model?

Let's say I have an Order attached with Cart, and now want to get the total amount of each order so obviously I would need to get the cart against that order, and then I can get the total price in the cart. How I can do this? is there any possible way?

Or in other words, Is there any possible way to create a one to one relationship between the Cart and the Eloquent Model?

smaqeelkazmi commented 4 years ago

Is there anyone to help me out, please?