mardi 22 mai 2018

overridden authenticated method in Login Controller doesn't work

I'm trying to override the authenticated method in the Login Controller but somehow it isn't working. I just tried to simply dd(); but still it doesn't work.

Below is my function code:

public function authenticated(Request $request, $user)
{
    dd("hi");
}

What I actually wish to do is as below, but just for simplicity sake, I have dd(); in the function.

public function authenticated(Request $request, $user)
{
    if (!$user->verified) {
        auth()->logout();
        return back()->with('warning', 'You need to confirm your account. We have sent you an activation code, please check your email.');
    }
    return redirect()->intended($this->redirectPath());
}



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

Aucun commentaire:

Enregistrer un commentaire