Skip to content

Instantly share code, notes, and snippets.

@introwit
Last active October 18, 2016 10:15
Show Gist options
  • Save introwit/45f0b387ce72e00fce28ed6430e196fa to your computer and use it in GitHub Desktop.
Save introwit/45f0b387ce72e00fce28ed6430e196fa to your computer and use it in GitHub Desktop.
Email verification blog - Part 5
<?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