From abdcf4193841292d0a149c391ae14312a1fc1670 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Mon, 24 Aug 2020 02:16:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B4=AD=E7=89=A9=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Request/ShopCarRequest.php | 43 ++++++++++++++++++++++++++++ app/Request/UpdateShopCarRequest.php | 43 ++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 app/Request/ShopCarRequest.php create mode 100644 app/Request/UpdateShopCarRequest.php diff --git a/app/Request/ShopCarRequest.php b/app/Request/ShopCarRequest.php new file mode 100644 index 0000000..64a7748 --- /dev/null +++ b/app/Request/ShopCarRequest.php @@ -0,0 +1,43 @@ + 'required|nonempty|integer|exists_enable:ims_cjdc_shopcar,id', + ]; + } + + public function messages(): array + { + return [ + 'id.exists_enable' => ':attribute不存在或被禁用', + 'service_personnel_id.*' => ':attribute信息不正确' + ]; + } + + public function attributes(): array + { + return [ + 'id' => '购物车记录', + ]; + } +} diff --git a/app/Request/UpdateShopCarRequest.php b/app/Request/UpdateShopCarRequest.php new file mode 100644 index 0000000..70bb274 --- /dev/null +++ b/app/Request/UpdateShopCarRequest.php @@ -0,0 +1,43 @@ + 'required|nonempty|integer|exists_enable:lanzu_service_personnel,id,status=1', + ]; + } + + public function messages(): array + { + return [ + 'service_personnel_id.exists_enable' => ':attribute不存在或被禁用', + 'service_personnel_id.*' => ':attribute信息不正确' + ]; + } + + public function attributes(): array + { + return [ + 'service_personnel_id' => '服务专员', + ]; + } +}