|
|
|
@ -210,6 +210,24 @@ class ParkingInformationController extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function clear(): JsonResponse |
|
|
|
{ |
|
|
|
try { |
|
|
|
$this->service->clearModel(); |
|
|
|
return $this->responseService->success( |
|
|
|
null, |
|
|
|
__('admin.delete_succeeded') |
|
|
|
); |
|
|
|
} catch (ValidationException|CustomException $e) { |
|
|
|
throw $e; |
|
|
|
} catch (Exception $e) { |
|
|
|
return $this->responseService->systemError( |
|
|
|
__('exception.license_plate.destroy_failed') . ':' |
|
|
|
. $e->getMessage() |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return JsonResponse |
|
|
|
* @throws InvalidArgumentException |
|
|
|
@ -218,7 +236,7 @@ class ParkingInformationController extends BaseController |
|
|
|
{ |
|
|
|
try { |
|
|
|
return $this->responseService->success( |
|
|
|
$this->methodShow('information') |
|
|
|
$this->methodShow('information', ['clear']), |
|
|
|
); |
|
|
|
} catch (Exception $e) { |
|
|
|
return $this->responseService->systemError( |
|
|
|
|