laravel 设置Cookies不生效



 cookie('admin_username',123,45000);
        dd(cookie('admin_username'));

打印出来为Null

这是为什么?

也尝试过Cookie:make Cookie:get
获取的都是Null

laravel php-laravel laravel-5 php

3011301 10 years ago

在响应里设置 response('')->withCookie(cookie('name','laravel',1000))

kimi天天 answered 10 years ago

Your Answer