jeudi 24 août 2017

How can i change the default Auth Password field name

i want to change the default password field name of Laravel Auth, this because im using ORACLE, How can i change ? i tried this but i cant login

User.php

protected $table = 'SEG_USUARIOS1';

public function getAuthPassword()
{
    return $this->contrasenha;
}

RegisterController.php

protected function validator(array $data)
{
    return Validator::make($data, [

        'email' => 'required|string|email|max:255|unique:SEG_USUARIOS1',
        'contrasenha' => 'required|string|min:6|confirmed',
    ]);
}


protected function create(array $data)
{


    $user =  User::create([
        'nombre' => $data['name'],
        'email' => $data['email'],
        'contrasenha' => bcrypt($data['password']),
        'verifytoken' => Str::random(40),
    ]);


    $thisUser = User::findOrFail($user->usuario_id); 
    $this->sendEmail($thisUser);
    return $user;
}

Im Using laravel 5.4



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2xwIitg
via IFTTT

Aucun commentaire:

Enregistrer un commentaire