/**
  * @param Request $request
  * @return string
  */
 public function postImages(Request $request)
 {
     $response = array();
     $root = 'uploads/';
     $savePath = $root . Auth::Id() . "/" . date('Y_m') . "/" . date('d');
     if ($request->hasFile('file')) {
         $image = $request->file('file');
         if ($image->isValid()) {
             $extension = $image->getClientOriginalExtension();
             $file_name = str_random(3) . time() . '.' . $extension;
             $image->move($savePath, $file_name);
             $response['status'] = true;
             $response['code'] = 200;
             $response['message'] = 'File uploaded successfully';
             $response['file_path'] = $savePath . "/" . $file_name;
             $response['file_name'] = $file_name;
         } else {
             $response['status'] = false;
             $response['code'] = 500;
             $response['message'] = 'Something went wrong while Uploading';
             $response['file_path'] = false;
             $response['file_name'] = false;
         }
     } else {
         $response['status'] = false;
         $response['code'] = 404;
         $response['message'] = 'No image uploaded';
         $response['file_path'] = false;
         $response['file_name'] = false;
     }
     return json_encode($response);
 }