From e3450141e125c1e2a3b5c7e31527f331d214f9a1 Mon Sep 17 00:00:00 2001 From: liapples Date: Thu, 22 Jul 2021 09:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0id=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/ChannelController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ChannelController.php b/app/Http/Controllers/Api/ChannelController.php index 1e0a11f..5cb25c0 100644 --- a/app/Http/Controllers/Api/ChannelController.php +++ b/app/Http/Controllers/Api/ChannelController.php @@ -15,14 +15,14 @@ class ChannelController extends Controller // 所有频道列表 public function index() { - $list = Channel::orderBy('sort')->orderBy('id', 'DESC')->get(['pid', 'name', 'icon']); + $list = Channel::orderBy('sort')->orderBy('id', 'DESC')->get(['id', 'pid', 'name', 'icon']); return $this->success($list); } // 我的频道 public function my() { - $channel_ids = UserChannel::where('uid', $this->user_id)->value('channels'); + $channel_ids = UserChannel::where('user_id', $this->user_id)->value('channels'); $list = Channel::whereIn('id', $channel_ids)->get(['id', 'pid', 'name', 'icon']); return $this->success($list); }