Forum Laravel @if(Cookie::has('cookie_name') return false even if cookie exist
Hi all,
I have this code :
@if(Cookie::has('accept_cookie')) Cookie exist @else Cookie doesn't exist @endif
It always show Cookie doesn't exist, even if the cookie exist. What is wrong with this please ? My controller only show the view, doesn't pass parameters to the view :
public function index() { return view('pages/homepage'); }
Thank's for your help
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
@if(Cookie::has('cookie_name') return false even if cookie exist
Hi all,
I have this code :
It always show Cookie doesn't exist, even if the cookie exist. What is wrong with this please ? My controller only show the view, doesn't pass parameters to the view :
Thank's for your help