Level 15
Jetstream has profile image uploads built-in and has defaults already included. If you want that functionality to work on registration you could call the built-in functionality after the $this->createTeam($user) call, or right before it. Just do it after the user is created so you can use the updateProfilePhoto method.
return tap(User::create([
'name' => $input['name'],
'email' => $input['email'],
'password' => Hash::make($input['password']),
]), function (User $user) use ($input) {
$this->createTeam($user);
if (isset($input['image'])) {
$user->updateProfilePhoto($input['image']);
}
});
This is how Fortify implements it in the UpdateUserProfileInformation class, you can look at the action under app/Actions/Fortify.