1

i am new to laravel and having an issue regarding REST API over file processing,and i am using dingo laravel api Here what i have done so for

    $user =  User::findOrFail($request->user_id);
    $user->first_name = $request->first_name;
    $user->avatar = $request->file('userfile');
    if($user->save()){
        return response()->json($user, 200);
    }

How do i post a file or image from api and then store in upload folders physically ? I am able to post data without file.

Any help will be highly appreciated.

Khirad Zahra
  • 843
  • 2
  • 17
  • 42

0 Answers0