From 6d99c4959cd6de49652098a79e04a52e88b7b700 Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Tue, 13 Oct 2020 17:00:03 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E5=AE=8C=E5=96=84=E8=A7=84=E5=88=99?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/middleware/RequestFilter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/middleware/RequestFilter.php b/app/middleware/RequestFilter.php index bf40267..df91ad2 100644 --- a/app/middleware/RequestFilter.php +++ b/app/middleware/RequestFilter.php @@ -35,7 +35,7 @@ class RequestFilter { } if ($newRule) { - $validate = Validate::make($newRule); + $validate = Validate::rule($newRule); if (!$validate->check($data)) { return json(['code' => ReturnCode::PARAM_INVALID, 'msg' => $validate->getError(), 'data' => []]); } @@ -50,7 +50,7 @@ class RequestFilter { * @return array * @author zhaoxiang */ - public function buildValidateRule($rule = array()) { + public function buildValidateRule($rule = []) { $newRule = []; if ($rule) { foreach ($rule as $value) {