src/MediaUploader.php
private function deleteExistingMedia(Media $model)
    {
        Media::where('disk', $model->disk)
            ->where('directory', $model->directory)
            ->where('filename', $model->filename)
            ->where('extension', $model->extension)
            ->delete();

        $this->deleteExistingFile($model);
    }
private function deleteExistingMedia(Media $model)
    {
        Media::where('disk', $model->disk)
            ->where('directory', $model->directory)
            ->where('filename', $model->filename)
            ->where('extension', $model->extension)
            ->delete();

        $this->deleteExistingFile($model);
    }
private function deleteExistingMedia ( Media $ model ) { Media :: where ( 'disk' , $ model -> disk ) -> where ( 'directory' , $ model -> directory ) -> where ( 'filename' , $ model -> filename ) -> where ( 'extension' , $ model -> extension ) -> delete ( ) ; $ this -> deleteExistingFile ( $ model ) ; }
Delete the media that previously existed at a destination.
@param  \Plank\Mediable\Media  $model
@return void
Delete the media that previously existed at a destination .