NEOJPK
NEOJPK

Reputation: 833

Route::auth Laravel

Im learning laravel and i want to create a login/registration module. For this i used the php artisan make:auth in the console. All good for the moment. But i do not want to use the email-field for login.

This is the User::model.

    use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */

    protected $table = 'login_usuarios';



    protected $fillable = [
        'rut', 'contrasena'
    ];

    public $timestamps = false;

}

I want the user to use his RUT (Personal identification number) to access the system. But i keep recieving errors about emails.

I've searched in the imports Illuminate\Foundation\Auth\User with no luck

Hope you understand. Thank you

Upvotes: 0

Views: 64

Answers (1)

Bogdan Bocioaca
Bogdan Bocioaca

Reputation: 36

in

app/Http/AuthController.php 

try adding

protected $username = 'username';

Upvotes: 1

Related Questions