Skip to content

Instantly share code, notes, and snippets.

@introwit
Last active October 11, 2016 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save introwit/96d2fd05322231543ffe6ac856a62618 to your computer and use it in GitHub Desktop.
Save introwit/96d2fd05322231543ffe6ac856a62618 to your computer and use it in GitHub Desktop.
Email verification blog - gist 1
<?php
/**
* Create a new user instance after a valid registration with a random email token
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'email_token' => str_random(10),
]);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment