src/GenericFile.php
public function deleteUploadedFile($model, $path_pattern = null)
	{
		if ( ! $this->canRemoveFiles())
		{
			return null;
		}

		$filepath = $this->path($model, $path_pattern);

		if ($filepath && file_exists($filepath))
		{
			return unlink($filepath);
		}

		return false;
	}
public function deleteUploadedFile($model, $path_pattern = null)
	{
		if ( ! $this->canRemoveFiles())
		{
			return null;
		}

		$filepath = $this->path($model, $path_pattern);

		if ($filepath && file_exists($filepath))
		{
			return unlink($filepath);
		}

		return false;
	}
public function deleteUploadedFile ( $ model , $ path_pattern = null ) { if ( ! $ this -> canRemoveFiles ( ) ) { return null ; } $ filepath = $ this -> path ( $ model , $ path_pattern ) ; if ( $ filepath && file_exists ( $ filepath ) ) { return unlink ( $ filepath ) ; } return false ; }
Delete uploaded file

@param array|Illuminate\Database\Eloquent\Model $model
@param string|null $path_pattern

@return string
Delete uploaded file