vendredi 5 octobre 2018

limit login attemps on laravel 5.7

I have laravel 5.7 project everything working fine but I have custom login

public function loginPost(LoginRequest $request)
{
    if (Auth::attempt(array('user_name' => $request->user_name, 'password' => $request->user_pass)))
    {
        if(Auth::check())
            return redirect('/');
        else
            return back();
    }
    else
    {
        return "login faled call administrator";
    }
}

How can I let laravel accept login attempt 3 times after that redirect for page waiting to 2 or 3 min etc.

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire