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 { // 文章详情 return response()->json(['title' => $article->title, 'content' => (new ArticleService($article))->getContent()]); } }