Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试过这个
$value = $request->cookie('AuthCookie'); $cookie->forget('AuthCookie'); $cookie->make('AuthCookie', $username, 44444);
但这不会更新 cookie,有时会崩溃。
我正在使用 5.4 版本的 laravel。
CookieJar您可以使用以下方法从容器中解析单例:
CookieJar
$cookie = resolve('cookie'); $cookie->forget('AuthCookie');
参考:
CookieJar 绑定到容器
从容器中解析