use Illuminate\Support\Facades\Mail;
protected function create(array $data)
{
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
$email_data = array(
'name' => $data['name'],
'email' => $data['email'],
);
Mail::send('welcome_email', $email_data, function ($message) use ($email_data) {
$message->to($email_data['email'], $email_data['name'])
->subject('Welcome to MyNotePaper')
->from('info@mynotepaper.com', 'MyNotePaper');
});
return $user;
}