this.session

October CMS Documentation Docs

this.session

您可以通过 this.session 访问当前session管理器,它会返回对象 Illuminate\Session\SessionManager 当前session配置.

# 从session检索数据

___TWIG0___

# 确定session中是否存在项目

___TWIG0___
    <h1>we found it in the session</h1>
___TWIG1___

# 从session中删除数据

# 删除单个键的数据

___TWIG0___

# 删除所有session数据

___TWIG0___