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

has it been defined as an auto-increment?

0

You mean, in the laravel project or in the database?
I didn't define anything beacause the database was already created.

Here is my Registrar class:

class Registrar implements RegistrarContract {

/**
 * Get a validator for an incoming registration request.
 *
 * @param  array  $data
 * @return \Illuminate\Contracts\Validation\Validator
 */
public function validator(array $data)
{
	return Validator::make($data, [
		'name' => 'required|max:255',
		'password' => 'required|confirmed|min:6',
	]);
}

/**
 * Create a new user instance after a valid registration.
 *
 * @param  array  $data
 * @return User
 */
public function create(array $data)
{
	return User::create([
		'login' => $data['name'],
		'pass' => bcrypt($data['password']),
	]);
}

}

Thank you!

0

I am feeling so dumb.

This error appeared because i just filled some fields instead of filling all of them in database.

Sorry, and thanks jacksoncharles. :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.