Last active
August 29, 2015 14:00
-
-
Save lozadaOmr/11165668 to your computer and use it in GitHub Desktop.
After Updating to Laravel 4.2, the User Model when using 'remember me' function for sessions will now require adding a `remember_token` field. And 3 new functions to be added to the User.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* "First, add a new, nullable remember_token of VARCHAR(100), TEXT, or equivalent to your users table. | |
* Next, if you are using the Eloquent authentication driver, update your User class with the following three methods: | |
* See http://laravel.com/docs/upgrade for further details. | |
*/ | |
public function getRememberToken() | |
{ | |
return $this->remember_token; | |
} | |
public function setRememberToken($value) | |
{ | |
$this->remember_token = $value; | |
} | |
public function getRememberTokenName() | |
{ | |
return 'remember_token'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment