Browse Source

车辆信息不存在报错

master
wanghongjun 4 days ago
parent
commit
07a43a5277
  1. 4
      app/Http/Controllers/Admin/ParkingLicensePlateController.php
  2. 3
      resources/lang/en/controller.php
  3. 3
      resources/lang/zh-CN/controller.php
  4. 3
      resources/lang/zh-TW/controller.php

4
app/Http/Controllers/Admin/ParkingLicensePlateController.php

@ -308,7 +308,7 @@ class ParkingLicensePlateController extends BaseController
$license_plate_id = ParkingLicensePlate::getValueId($license_plate);
if (!$license_plate_id) {
throw new Exception('');
throw new CustomException(__validation('controller.license_plate.not_exists'));
}
$parkingSpace = ParkingSpace::query()->where(
@ -328,6 +328,8 @@ class ParkingLicensePlateController extends BaseController
'parking_space_type' => $space_type_name
];
return $this->responseService->success($data);
} catch (CustomException $e) {
throw $e;
} catch (Exception $e) {
return $this->responseService->systemError(
__('controller.license_plate.not_put')

3
resources/lang/en/controller.php

@ -29,7 +29,8 @@ return [
],
'license_plate' => [
'clear_success' => 'Cleared successfully',
'not_put' => 'Please enter the correct license plate number'
'not_put' => 'Please enter the correct license plate number',
'not_exists' => 'Vehicle information does not exist'
],
'parking_pattern' => [
'not_parking_space' => 'There are no [superior] parking spaces in the current mode'

3
resources/lang/zh-CN/controller.php

@ -29,7 +29,8 @@ return [
],
'license_plate' => [
'clear_success' => '清除成功',
'not_put' => '请输入正确的车牌号'
'not_put' => '请输入正确的车牌号',
'not_exists' => '车辆信息不存在'
],
'parking_pattern' => [
'not_parking_space' => '当前模式没有 [优越] 车位'

3
resources/lang/zh-TW/controller.php

@ -29,7 +29,8 @@ return [
],
'license_plate' => [
'clear_success' => '清除成功',
'not_put' => '請輸入正確的車牌號'
'not_put' => '請輸入正確的車牌號',
'not_exists' => '車輛信息不存在'
],
'parking_pattern' => [
'not_parking_space' => '當前模式沒有[優越]車位'

Loading…
Cancel
Save