I notice you're wanting a "User" table but you specified a "user" table.
Is the case affecting it?
lucabernardino said:
I notice you're wanting a "User" table but you specified a "user" table.
Is the case affecting it?
I'm not sure if casing matters or not, but in either case the user table in MySQL is lowercase as well as the casing in my auth.php and user model is lowercase. Everywhere I can find it's lower case. I thought I only needed to specify the table in my model and specify Eloquent as my driver...
Found the issue. Buried in App\Service\Registrar.php
public function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}
in the 'email' => 'required|email|max:255|unique:users', you have to change the "unique:users" to "unique:user" or whatever your table name is. Apparently this line tells is that the email that your user enters must be a unique entry in the users table. After changing this to the correct table, the application allowed me to register.
zalnlol liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community