Last active
October 18, 2016 10:15
-
-
Save introwit/45f0b387ce72e00fce28ed6430e196fa to your computer and use it in GitHub Desktop.
Email verification blog - Part 5
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 | |
// Get the user who has the same token and change his/her status to verified i.e. 1 | |
public function verify($token) | |
{ | |
// The verified method has been added to the user model and chained here | |
// for better readability | |
User::where('email_token',$token)->firstOrFail()->verified(); | |
return redirect('login'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment