Laravel 5.4 Session not storing

Hi i am trying to set variable into session but every time flush my varible . i am using $cartArr = [ "menu_id" => $input["menu_id"], "restaurent_id" => $input["menu_details"]["restaurent_id"], "item_name" => $input["menu_details"]["menu_qty_name"], "item_qty" => $input["menu_details"]["menu_qty_id"], "item_img" => $input["menu_details"]["menu_type_image"], "item_price" => $input["menu_details"]["menu_price"], ]; Session::put("my_cart", $cartValue); some help me
Deepak Sharma
Asked 20-07-2024
207

Answer (1)
hey I was facing the same problem in Laravel 5.4 I found that adding the save method solved the problem. So you can use it I hope it help; Session::put('key', $value); Session::save();
Ankur Rajput
Asked 18-12-2019
45 Likes
Comments
Write comment

Submit your answer