session('subscribed')
Use session to check if visitor has subscribed to newsletter, if they have don't show subscription section
I have a page with no user system. However I do allow for people to subscribe to a newsletter. I have a bar on top of the page where I display a section for the user to subscribe to the newsletter. I know want to make it so that when a user has subscribed they wont no longer be disturbed by this bar (in this session)..
My thoughts is that when the user subscribes I assign something to my session() in my controller when the user subscribes.
kind of like this;
session('subscribed', true);
Then each time when I load a blade I check
@if(session()->subscribed === false)
include('partials.subscribeForm');
@endif
But what I am not being able to figure out is the syntax for this?
Is there anyone out there to help?
Please or to participate in this conversation.