Skip to content

Instantly share code, notes, and snippets.

@lozadaOmr
Last active August 29, 2015 14:00
Show Gist options
  • Save lozadaOmr/11165668 to your computer and use it in GitHub Desktop.
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
/**
* "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