/** * delete content from the database * @param $id * @param $path * @return bool * @throws \Exception */ public static function deleteContent($id, $path) { $status = false; try { $galleryContent = GalleryContent::find($id); $path .= $galleryContent->contentName . '.' . $galleryContent->contentFileExtension; File::Delete($path); $galleryContent->delete(); $status = true; } catch (Exception $e) { } return $status; }