I am doing some authentication but the remember_token always errors out, it is in the database as a varchar(100) and nullable. the functions are in the user model (see below) but when I'm calling Auth::logout() it gives me the SQLSTATE[42S22]: Column not found: 1054 Unknown column 'remember_token' in 'field list'
error. What am I doing wrong?
/**
* Get the token value for the "remember me" session.
*
* @return string
*/
public function getRememberToken()
{
return $this->remember_token;
}
/**
* Set the token value for the "remember me" session.
*
* @param string $value
* @return void
*/
public function setRememberToken($value)
{
$this->remember_token = $value;
}
/**
* Get the column name for the "remember me" token.
*
* @return string
*/
public function getRememberTokenName()
{
return 'remember_token';
}
I don't really know what code you need, so if you need any, please ask!
The logout code:
public function getLogout($token){
if($token != '{token}' . csrf_token()){
echo 'FAIL';
return;
}
Auth::logout();
return Redirect::route('home');
}
Here's the database column: