The following option will allow you to upload an image with many to many relationships:
Answer
Correct Answer: $file = Request::file('resume'); $extension = $file->getClientOriginalExtension(); Storage::disk('local')->put($file->getFilename().'.'.$extension, File::get($file)); $resume = new Resume(); $resume->mime = $file->getClientMimeType(); $resume->filename = $file->getFilename().'.'.$extension; $candidate=new Candidate(); $data=array_except($data, array('_token','resume')); $user->candidate()->save($candidate); $candidate->resume()->save($resume); $candidate=$user->candidate($user); $candidate->update($data);
Explanation:
Note: This Question is unanswered, help us to find answer for this one