laravel在子域和根域之间共享cookie

I do the following in my laravel project on subdomain.domain.com:

return response('hello')->cookie(cookie('name', 'value', 60););

When I look in the cookies of subdomain.domain.com I see the cookie/

But I also need the cookie on domain.com.

有没有办法告诉laravel在子域和根域之间共享它?

评论