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

@@ -5,6 +5,7 @@ namespace App\Jobs\Dashboard\Product;
use App\Http\Requests\Dashboard\Product\Update as Request;
use App\Models\Screen;
use App\Models\Product;
use Illuminate\Support\Facades\Storage;
class Deletes
{
@@ -29,14 +30,7 @@ class Deletes
foreach ($this->request->deletes['screens'] as $screen) {
$sc = Screen::where('id', $screen)->first();
if (!empty($sc)) {
if (is_file($sc->path)) {
unlink($sc->path);
}
if (is_file($sc->path_thumb)) {
unlink($sc->path_thumb);
}
Storage::delete([$sc->path, $sc->path_thumb]);
$sc->delete();
}
}