Level 80
May 26, 2020
1
Level 4
Spark - Customizing User Registration
If I want to have an extra field in laravel, normally, I'd simply add in the field and take care of it in the controller.
In laravel spark, however, I don't understand where the logic goes.
Would I need to change it within the RegisterController?
protected function create(array $data)
{
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
// ADD IN MY OWN CODE HERE.
]);
Mail::to($user->email)->send(new NewUser($user));
return $user;
}
Please or to participate in this conversation.