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?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire