dimanche 2 juin 2019

send an email after veryfy the email in Laravel 5.7

I am working with laravel 5.7 and has designed a verify system in controller like this,

 public function verifyUser($token)
    {
        $verifyUser = VerifyUser::where('token', $token)->first();
        if(isset($verifyUser) ){
            $user = $verifyUser->user;
            if(!$user->verified) {
                $verifyUser->user->verified = 1;

                $verifyUser->user->save();

                $info = "Your e-mail is verified. You can now login.";
            }else{
                $info = "Your e-mail is already verified. You can now login.";
            }
        }else{
             return redirect()->back()->with('warning', "Sorry your email cannot be identified.");
        }

         return redirect()->back()->with('info', $info);
    }
}

now i need send a default email to admin admin@mybook.net to notify after veryfied above system inside this methods. how can I manage this?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Z1c6vK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire