Browse Source

默认属性不可删除

master
wanghongjun 4 weeks ago
parent
commit
bd704d0c3a
  1. 3
      app/Services/ParkingSpaceAttributesService.php

3
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');

Loading…
Cancel
Save