private function performDeleteMedia($type, $path)
    {
        switch (Str::lower($type)) {
            case Media::MEDIA_TYPE_FILE:
                return $this->media->deleteFile($path);

            case Media::MEDIA_TYPE_DIRECTORY:
                return $this->media->deleteDirectory(trim($path, '/'));

            default:
                return false;
        }
    }