/**
  * Handle the command.
  *
  * @param  MediaSanitizeCommand  $command
  * @return void
  */
 public function handle($command, $next)
 {
     $files = $this->parseFilesIntoArray($command->files());
     $this->normalizeFiles($files);
     $command->files($this->collection);
     return $next($command);
 }
Beispiel #2
0
 /**
  * Handle the command.
  *
  * @param  MediaSanitizeCommand  $command
  * @return void
  */
 public function handle($command, $next)
 {
     $command->files()->transform(function ($item) use($command) {
         $item['file']->move($command->dir, $item['name']);
         return $item['name'];
     });
     return $next($command);
 }