From f9c14ee579e08734145b355c74452d0d6c9f3811 Mon Sep 17 00:00:00 2001 From: zhaoxiang <756958008@qq.com> Date: Tue, 27 Feb 2018 21:13:54 +0800 Subject: [PATCH] =?UTF-8?q?added=20=E5=AE=8C=E6=88=90hot=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wiki/controller/Index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/wiki/controller/Index.php b/application/wiki/controller/Index.php index cbf8c8c..9ca772f 100644 --- a/application/wiki/controller/Index.php +++ b/application/wiki/controller/Index.php @@ -81,10 +81,12 @@ class Index extends Base { DataType::TYPE_MOBILE => 'Mobile' ); - $groupInfo = ApiGroup::get(['hash' => $groupHash])->toArray(); + $groupInfo = ApiGroup::get(['hash' => $groupHash]); + $groupInfo->hot = $groupInfo->hot + 1; + $groupInfo->save(); return view('', [ - 'groupInfo' => $groupInfo, + 'groupInfo' => $groupInfo->toArray(), 'request' => $request, 'response' => $response, 'dataType' => $dataType,