mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:01:05 +03:30
change test result controller
This commit is contained in:
@@ -405,18 +405,27 @@ class TestResultController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
if (count($imagesDeleted)) {
|
||||
foreach ($imagesDeleted as $key => $imageDeleted) {
|
||||
$Gallery = Gallery::where('path', $imageDeleted)->first();
|
||||
if ($Gallery) {
|
||||
Storage::disk('public')->delete(static::storage_path($imageDeleted));
|
||||
Uploadable::where('gallery_id', $Gallery->id)->where('uploadable_id', $TestResult->id)->where('uploadable_type', get_class($TestResult))->delete();
|
||||
$Gallery->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (count($imagesDeleted)) {
|
||||
// foreach ($imagesDeleted as $key => $imageDeleted) {
|
||||
// $Gallery = Gallery::where('path', $imageDeleted)->first();
|
||||
// if ($Gallery) {
|
||||
// Storage::disk('public')->delete(static::storage_path($imageDeleted));
|
||||
// Uploadable::where('gallery_id', $Gallery->id)->where('uploadable_id', $TestResult->id)->where('uploadable_type', get_class($TestResult))->delete();
|
||||
// $Gallery->delete();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
if (count($imagesDeleted)) {
|
||||
foreach ($imagesDeleted as $key => $imageDeleted) {
|
||||
$Gallery = Gallery::where('path', $imageDeleted)->first();
|
||||
if ($Gallery) {
|
||||
Storage::disk('public')->delete(static::storage_path($imageDeleted));
|
||||
Uploadable::where('gallery_id', $Gallery->id)->where('uploadable_id', $TestResult->id)->where('uploadable_type', get_class($TestResult))->delete();
|
||||
$Gallery->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return \MessageResponse::success(null,trans('messages.update'));
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Reference in New Issue
Block a user