My code is like this :
public function postLogin(Request $request)
{
$this->validate($request, [
'user_name' => 'required|user_name', 'password' => 'required',
]);
$credentials = $request->only('user_name', 'password');
if ($this->auth->attempt($credentials, $request->has('remember')))
{
return redirect($this->redirectPath());
}
return redirect($this->loginPath())
->withInput($request->only('user_name', 'remember'))
->withErrors([
'user_name' => $this->getFailedLoginMessage(),
]);
}
When I click button login, there is error message :
BadMethodCallException in Validator.php line 2615: Method [validateUserName] does not exist.
Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire