Skip to content
Advertisement

Inserting cart product to database after order placement with Crinsane Laravel

I am using Crinsane Laravel in my ecommerce project. I want to add the cart products as an order in the order table. I have used foreach function in the OrderController:

JavaScript

But the above code only saves one product data in the database. What is wrong going here?

Edit The output of dd(Cart::Content());

JavaScript

Advertisement

Answer

Your issue is here:

JavaScript

I am making some assumptions here, but It should look more like:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement