// vendor/laravel/framework/src/Illuminate/Session/Store.php
// 添加下面方法,然后在需要的地方,Session::hasSession()
public function hasSession(){
return $this->handler->read($this->getId()) ? true : false;
}
//
public function resetId($id)
{
$this->flush();
$this->id = $id;
if($this->hasSession()){
$this->loadSession();
}
}
laravel 自定义 检查 session 数据是否存在
最新推荐文章于 2020-07-20 04:37:26 发布