user(); return view('user.knowledge', [ 'subType' => $nodeService->getActiveNodeTypes(), 'subUrl' => $user->sub_url, 'subscribe' => $user->subscribe->only(['status', 'ban_desc']), 'knowledge' => Article::type(1)->lang()->orderByDesc('sort')->latest()->get()->groupBy('category'), ]); } public function show(Article $article): JsonResponse { // 公告详情 $articleService = new ArticleService($article); return response()->json(['title' => $article->title, 'content' => $articleService->getContent()]); } }