Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function storeAvatar()
- {
- $this->validate(request(), [
- 'avatar' => ['required', 'image']
- ]);
- auth()->user()->update([
- 'avatar_path' => request()->file('avatar')->store('avatars', 'public')
- ]);
- return response([], 204);
- // return back();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement