I am using the Laravel 5.2 authentication standard Controlller:
php artisan make:auth
As the names are in English, I need to change to Portuguese. I already configured the locale for Portuguese, in /config/app.php :
'locale' => 'pt-BR',
I changed the AuthController.php as follows:
protected function validator(array $data)
{
$validator = Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
$correct_names = [
'name' => 'Nome',
'email' => 'E-mail',
'password' => 'Senha',
];
return $validator->setAttributeNames($correct_names);
}
When creating a user, using link , the field names are correct, however on the login page , link , the field names are still in English and email password ).
Can anyone give a hint how to solve this?