Skip to content

Instantly share code, notes, and snippets.

@thannaske
Created May 18, 2018 18:30
Show Gist options
  • Save thannaske/f7ef8ef97fcfbccdb6496e80290522f5 to your computer and use it in GitHub Desktop.
Save thannaske/f7ef8ef97fcfbccdb6496e80290522f5 to your computer and use it in GitHub Desktop.
<?php
// [...]
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
// For user e-mail address confirmation
'confirmation_token' => User::generateToken(),
]);
}
// [...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment