0

I have a function inside a controller where I set a value for oa.action cookie:

public function setActionCookie($action) { $actionCookie = cookie("oa.action", $action, 30, '/', null, true, false, false, 'None'); Cookie::queue($actionCookie); } 

Everything works when I use the Inspector panel, $action always has a value but when I try to output cookies values with dd($request->cookie());, I always get "oa_action" => null

Any idea why?

0

1 Answer 1

2

You should avoid dots on cookie names. The PHP transforms the dot . in underscore _.

And Laravel uses the PHP's native setcookie method.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.