This commit is contained in:
2026-04-16 11:25:40 +05:00
parent 2ba5677c45
commit 3aa4601229
13 changed files with 80 additions and 234 deletions

View File

@@ -155,14 +155,7 @@ class Controller extends ExController
$this->authorize('delete', 'categories');
$category = Category::findOrFail($category);
if (is_file($category->image)) {
unlink($category->image);
}
// delete image from s3
if (env('FILESYSTEM_DISK') == 's3') {
Storage::disk('s3')->delete($category->image);
}
Storage::delete($category->image);
$category->delete();
$this->info(trans('admin.messages.deleted'));