change test result controller

This commit is contained in:
Fateme
2020-06-06 19:19:53 +04:30
parent 6e4e5e255f
commit 7496f1213f
3 changed files with 20 additions and 11 deletions
+12 -3
View File
@@ -405,6 +405,18 @@ 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)) { if (count($imagesDeleted)) {
foreach ($imagesDeleted as $key => $imageDeleted) { foreach ($imagesDeleted as $key => $imageDeleted) {
$Gallery = Gallery::where('path', $imageDeleted)->first(); $Gallery = Gallery::where('path', $imageDeleted)->first();
@@ -416,9 +428,6 @@ class TestResultController extends Controller
} }
} }
}
return \MessageResponse::success(null,trans('messages.update')); 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