How to implement rememeber me functionality in laravel 5.1? Can anyone give me an example?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Laravel authentication offers remember me functionality out of the box.
In order to use it you need to do 2 things:
If you do this, Laravel will generate a token that will be saved in users table and in a cookie. On subsequent requests, even if session cookie is not available, user will be authenticated automatically as long as remember-me cookie is there.
You can find more details and example in the docs: https://laravel.com/docs/5.1/authentication#remembering-users