validate([
'profile.name' => 'required',
'profile.email' => 'required'
// TASK: imagine that in the Blade the fields are
//
//
// Write validation rules, so both name and email are required
]);
auth()->user()->update($request->profile ?? []);
return 'Success';
}
}