2 months ago

send static data with eloquent result

Posted 2 months ago by ethar

from cookies, I get (item_id, item_qty), depend on item_id I make a select statement to return data,

I want to send item_qty with this statement to the blade

    $cookie_data = stripslashes($_COOKIE["shopping_cart_panorama"]);
    foreach ($cart_data as $key=>$values){
        array_push($qty,$values['item_qty']);//how send quantity with query result
    $cart_product=Products::select('id','img', productName','price')
return view('front.cart',compact('cart_product'));

in the blade, I wat to show data get from the eloquent query, with the quantity of each product that comes from cookies

Please sign in or create an account to participate in this conversation.