[Vuejs]-Vuejs form data sent via api not visible on laravel controller

0👍

Pass the request as parameter to the function and call the all() method on the request instance.

 public function uploadDocument(Request $request)
 {
     $input = $request->all();

     dd($input);
 }

To take and save file with its name concatenated with a timestamp in public/images folder try

//Assuming you have the file input name as `photo` 
if ($file = $request->file('photo')) {

  $name = time() . $file->getClientOriginalName();
  $file->move('images/', $name);

}
👤Xixis

0👍

this is the form …note its taking with it the attachment data from computed property..

 <el-upload
                    class="upload-demo"
                    drag
                    :action=url
                    ref="upload"
                    :data=attachment
                    :headers="defaultHeaders"
                    :on-error="errorOnUpload"
                    :on-success="showUploadSuccess"
                    :accept=extensions
                    :thumbnail-mode="false"
                    :auto-upload="false">
            </el-upload>

<el-button type="success" size="mini" @click="upload" class="el-icon-upload">upload</el-button>

i have noted that i set the application_id to be set to the store when client applies, but now am dealing with edit, its taking the default state of the application_id which is null

Leave a comment