diff --git a/app/Services/ParkingSpaceAttributesService.php b/app/Services/ParkingSpaceAttributesService.php index 0560d5a..99ebaf4 100644 --- a/app/Services/ParkingSpaceAttributesService.php +++ b/app/Services/ParkingSpaceAttributesService.php @@ -117,6 +117,9 @@ class ParkingSpaceAttributesService DB::beginTransaction(); $model = ParkingSpaceAttributes::query()->findOrFail($id); + if ($model['is_default'] == 1) { + throw new Exception(__('admin.delete_failed')); + } $this->logService->logDeleted($model, 'space_attributes.delete');