You want to create a cookie.
You can use this method to generate a new cookie. Keep in mind, this does not send a cookie to the user, it simply creates a cookie object.
To create a simple cookie, which will expire at the end of the user’s session.
To create a cookie that won’t expire for 60 minutes, add a third parameters.
Of course, you can pass all the normal cookie parameters.
What should you do with the cookie?
Well, normally, you’d send it the user. Additional recipes coming for this.