session

session('user_info',$user_info);

$user_id = $_SESSION['user_info']['user_id'];

原文地址:https://www.cnblogs.com/wangyuman26/p/6830477.html