src/Commands/ImportMediaCommand.php
protected function updateRecordForFile(Media $media, $path)
    {
        try {
            if ($this->uploader->update($media)) {
                ++$this->counters['updated'];
                $this->info("Updated record for {$path}", 'v');
            } else {
                ++$this->counters['skipped'];
                $this->info("Skipped unmodified file at {$path}", 'v');
            }
        } catch (MediaUploadException $e) {
            $this->warn($e->getMessage(), 'vvv');
            ++$this->counters['skipped'];
            $this->info("Skipped file at {$path}", 'v');
        }
    }
protected function updateRecordForFile(Media $media, $path)
    {
        try {
            if ($this->uploader->update($media)) {
                ++$this->counters['updated'];
                $this->info("Updated record for {$path}", 'v');
            } else {
                ++$this->counters['skipped'];
                $this->info("Skipped unmodified file at {$path}", 'v');
            }
        } catch (MediaUploadException $e) {
            $this->warn($e->getMessage(), 'vvv');
            ++$this->counters['skipped'];
            $this->info("Skipped file at {$path}", 'v');
        }
    }
protected function updateRecordForFile ( Media $ media , $ path ) { try { if ( $ this -> uploader -> update ( $ media ) ) { ++ $ this -> counters [ 'updated' ] ; $ this -> info ( "Updated record for {$path}" , 'v' ) ; } else { ++ $ this -> counters [ 'skipped' ] ; $ this -> info ( "Skipped unmodified file at {$path}" , 'v' ) ; } } catch ( MediaUploadException $ e ) { $ this -> warn ( $ e -> getMessage ( ) , 'vvv' ) ; ++ $ this -> counters [ 'skipped' ] ; $ this -> info ( "Skipped file at {$path}" , 'v' ) ; } }
Update an existing media record.
@param  \Plank\Mediable\Media $media
@param  string $path
@return void
Update an existing media record .