Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. public function storeAvatar()
  2.     {
  3.         $this->validate(request(), [
  4.             'avatar' => ['required', 'image']
  5.         ]);
  6.  
  7.         auth()->user()->update([
  8.             'avatar_path' => request()->file('avatar')->store('avatars', 'public')
  9.         ]);
  10.  
  11.         return response([], 204);
  12.  
  13. //        return back();
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement