', $patent->id)->where('status', 1)->first(); return view('patents.show', compact('patent', 'next')); } //显示文章列表 public function list(Request $request) { $type = $request->type; $patents = Patent::where('status', 1) ->when($type, function ($q) use ($type) { $q->where('type', $type); }) ->paginate(); return view('patents.list', compact('patents')); } }