Ejemplo n.º 1
0
 /**
  * Convert the given array of Symfony UploadedFiles to custom Laravel UploadedFiles.
  *
  * @param  array  $files
  * @return array
  */
 protected function convertUploadedFiles(array $files)
 {
     return array_map(function ($file) {
         if (is_null($file) || is_array($file) && empty(array_filter($file))) {
             return $file;
         }
         return is_array($file) ? $this->convertUploadedFiles($file) : UploadedFile::createFromBase($file);
     }, $files);
 }