I have saved my session in database, Now I want to get the shopping cart session of special user by user_id
after scanning a qrcode and set that shopping cart session for Auth::user()
.
as you know, the session table in databse have these fields:
id
, user_id
, ip_address
, user_agent
, payload
, last_activity
how to access the $cart = session()->get('cart');
by user_id
?