Last active
May 19, 2018 09:25
-
-
Save thannaske/b0deec573ecd6ee2fded914dee5c5058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [...] | |
/** | |
* Perform the confirmation of the user's e-mail address. | |
* | |
* @param User $user The provided user instance | |
* @param $token string The provided confirmation token | |
* @return mixed | |
*/ | |
public function confirm(User $user, $token) { | |
if ($user->confirm($token)) { | |
$message = 'You successfully confirmed your e-mail address.'; | |
} else { | |
$message = 'Your e-mail address is either already confirmed or your confirmation token is wrong.'; | |
} | |
return redirect()->route('login')->withMessage($message); | |
} | |
// [...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment