Last active
October 11, 2016 16:38
-
-
Save introwit/96d2fd05322231543ffe6ac856a62618 to your computer and use it in GitHub Desktop.
Email verification blog - gist 1
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 | |
/** | |
* 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