Support the ongoing development of Laravel.io →
Authentication Database Eloquent
Last updated 1 year ago.
0

try composer dumpautoload or composer dumpautoload -o

0

Did you change the table variable in User/Member model?

0

class User extends Model implements AuthenticatableContract, CanResetPasswordContract {

use Authenticatable, CanResetPassword;

/**
 * The database table used by the model.
 *
 * @var string
 */
protected $table = 'members';

and error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vdvizhenii.users' doesn't exist (SQL: select count(*) as aggregate from users where email = ******)

0
<?php namespace App\Services; use App\User; use Validator; use Illuminate\Contracts\Auth\Registrar as RegistrarContract; 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', 'email' => 'required|email|max:255|unique:members', // unique:users -> unique:members 'password' => 'required|confirmed|min:6', 'captcha' => 'required|captcha', 'birthday' => 'required', 'terms_agree' => 'required' ]); } answer in comment
0

It looks like user table is defined in 3 different place out of the box Laravel 5.

    1. /config/auth.php ('table' => 'users',)
    1. In User.php (protected $table)
    1. In AuthController.php (there is a unique field validator as in @Kollley reply )
Last updated 8 years ago.
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.