Did you add remember_token varchar(255) Null to your users database table? Did you add the three functions in your User model?
public function getRememberToken()
{
return $this->remember_token;
}
public function setRememberToken($value)
{
$this->remember_token = $value;
}
public function getRememberTokenName()
{
return 'remember_token';
}
swgj19 said:
Did you add remember_token varchar(255) Null to your users database table? Did you add the three functions in your User model?
public function getRememberToken() { return $this->remember_token; } public function setRememberToken($value) { $this->remember_token = $value; } public function getRememberTokenName() { return 'remember_token'; }
the user model looks same but i dont think so for the database table, I just add this
$table->rememberToken();
to my database model (since I saw that code from the documentation), and I put that code like this one
Schema::create('users', function(Blueprint $table)
{
$table->rememberToken();
$table->increments('id');
$table->string('username');
$table->string('email');
$table->string('password');
$table->string('first_name');
$table->string('last_name');
$table->timestamps();
});
but the code still error
how can I implement your code into mine? oh! one more thing, do I have to use seed or migrate command again to reset the database
You are simply missing an "_"
remember_token
http://laravel.com/docs/upgrade
To rollback all migrations and reset again:
php artisan migrate:refresh
php artisan migrate:refresh --seed
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community