Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

Have you added the remember_token to your migration? Look at my migration for the users:

<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('users', function(Blueprint $table)
		{
			$table -> increments('id');

			$table -> string('name', 32);
			$table -> string('email', 320);
			$table -> string('password', 64);
			$table -> string('remember_token', 100) -> nullable();

			$table -> timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('users');
	}

}

Maybe you should also hide the token in your model:

protected $hidden = array(
		'password',
		'remember_token'
	);
0

thanks it solved....,the cause of this error was column remember_token that i did not have before

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

saghafi saghafi Joined 29 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.