diff --git a/app/Services/ParkingInformationService.php b/app/Services/ParkingInformationService.php index 6ab3f54..1537dbb 100644 --- a/app/Services/ParkingInformationService.php +++ b/app/Services/ParkingInformationService.php @@ -33,14 +33,14 @@ class ParkingInformationService extends BaseService DB::beginTransaction(); $license_plate = $data['license_plate']; - $license_plate = ParkingLicensePlate::query()->where( + $license_plate_data = ParkingLicensePlate::query()->where( 'number', $license_plate )->first(['id', 'space_type_id']); $license_plate_id = 0; - if ($license_plate) { - $license_plate_id = $license_plate['id']; - $space_type_id = $license_plate['space_type_id']; + if ($license_plate_data) { + $license_plate_id = $license_plate_data['id']; + $space_type_id = $license_plate_data['space_type_id']; } else { $space_type_data = ParkingSpaceType::getDefaultData(); $space_type_id = $space_type_data['id'] ?? 0;