How are you? Hope well. I have e-commerce project on laravel 9. Actually i want to make checkout. I have add to cart function with sessions(it works fine), i want to make checkout. I am recieving cart with sessions
$order = session('cart');
var_dump($order);
This is working fine. It makes output with array(‘title’,’price’,’quantity’). Actually i want to put out each other and next save it in database.
array(1) { [52]=> array(3) { ["title"]=> string(11) "MacBook Pro" ["quantity"]=> int(1)
["price"]=> string(7) "2399.99" } }
This is array, which i have in checkout page. Please help me. I want to put out each other, for example: $order_title = ….
$order_price = …
$order_quantity = …
and next save it in database, table named ‘orders’.