Previously i asked about cookies in Laravel. I quite understand them now, but i'm running into a wall right now.
I want to/ was told to use a Cookie to 'remember' certain settings a user has made to the view.
Why i want to use Cookie:
I have a back-end on my website with a menubar on the left, filling entire height. But by default the menubar is kind of wide (just like mailchimp has), so i have created a button where the use can narrow the menubar. But, when the user narrows the menubar and goes to another page in the back-end, the menubar resets itself to the default width. I would like my website to 'remember' which kind of menubar the user likes best.
Now, i know how to make a Cookie, i know how to pass it to the next page but, what i do not know and would like to know is: How can i 'trigger' the cookie if the user presses the button to narrow the menubar?
Should this be done in the javascript used to make the narrow button work? I really don't know. I don't want to get some complete code or whatsoever, i just like some input from you guys on how do you do this or how would you do this.