You've already forked lubo_comment_query
							
							样式,排序,翻页保留查询条件,继续抽象
This commit is contained in:
		| @@ -19,7 +19,7 @@ class CommentQueryController extends BaseController | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         $comments = $query->paginate(10); | ||||
|         $comments = $query->paginate(10)->withQueryString(); | ||||
|         return view("index", [ | ||||
|             "keyword" => $keyword, | ||||
|             "comments" => $comments, | ||||
|   | ||||
| @@ -14,7 +14,7 @@ class DanmakuQueryController extends BaseController | ||||
|         $video_list = Videos::query() | ||||
|             ->withCount("danmakus", "bilibili_danmakus", "ixigua_danmakus", "douyin_danmakus") | ||||
|             ->orderByDesc("created_at") | ||||
|             ->paginate(10); | ||||
|             ->paginate(10)->withQueryString(); | ||||
|         return view("danmaku.index", [ | ||||
|             "video_list" => $video_list, | ||||
|         ]); | ||||
| @@ -35,7 +35,7 @@ class DanmakuQueryController extends BaseController | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         $danmakus = $query->orderBy("created_at", "asc")->paginate(20); | ||||
|         $danmakus = $query->orderBy("created_at", "asc")->paginate(20)->withQueryString(); | ||||
|         return view("danmaku.search_index", [ | ||||
|             "keyword" => $keyword, | ||||
|             "video" => $video, | ||||
|   | ||||
| @@ -12,7 +12,7 @@ class ProgramQueryController extends BaseController | ||||
|         $keyword = $request->get("keyword", ""); | ||||
|         $programs = Programs::query()->with(["appends", "video_pivots.video"]) | ||||
|             ->where("status", "=", 1)->limit(15)->orderByDesc("created_at") | ||||
|             ->paginate(); | ||||
|             ->paginate(10)->withQueryString(); | ||||
|         return view("program.index", [ | ||||
|             "keyword" => $keyword, | ||||
|             "programs"=>$programs, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user