Skip to content

Commit

Permalink
Update ProfileController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
OhmygoodR authored Feb 13, 2024
1 parent 7294c4c commit 83faf81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public function update(Request $request)
// <input name="profile[name]" ... />
// <input name="profile[email]" ... />
// Write validation rules, so both name and email are required
'profile'=>'required',
'profile.name'=>'required',
'profile.email'=>'required'
]);

auth()->user()->update($request->profile ?? []);
Expand Down

0 comments on commit 83faf81

Please sign in to comment.