You've already forked lubo_comment_query
							
							使用Mix,Tailwind,更改对应样式
This commit is contained in:
		| @@ -19,7 +19,7 @@ class CommentQueryController extends BaseController | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         $comments = $query->limit(20)->get(); | ||||
|         $comments = $query->paginate(10); | ||||
|         return view("index", [ | ||||
|             "keyword" => $keyword, | ||||
|             "comments" => $comments, | ||||
|   | ||||
| @@ -11,7 +11,7 @@ class DanmakuQueryController extends BaseController | ||||
| { | ||||
|     public function index() | ||||
|     { | ||||
|         $video_list = Videos::query()->withCount("danmakus")->orderByDesc("created_at")->limit(20)->get(); | ||||
|         $video_list = Videos::query()->withCount("danmakus")->orderByDesc("created_at")->paginate(10); | ||||
|         return view("danmaku.index", [ | ||||
|             "video_list" => $video_list, | ||||
|         ]); | ||||
| @@ -21,8 +21,8 @@ class DanmakuQueryController extends BaseController | ||||
|     { | ||||
|         $video = Videos::query()->withCount("danmakus")->where("bvid", "=", $bvid)->firstOrFail(); | ||||
|         $keyword = $request->get("keyword", ""); | ||||
|         $query = VideoDanmakus::query()->where("video_bvid", "=", $bvid); | ||||
|         if ($keyword) { | ||||
|             $query = VideoDanmakus::query()->where("video_bvid", "=", $bvid); | ||||
|             $keyword_split = explode(" ", $keyword); | ||||
|             foreach ($keyword_split as $_keyword) { | ||||
|                 if (mb_strlen(trim($_keyword)) > 0) { | ||||
| @@ -31,10 +31,8 @@ class DanmakuQueryController extends BaseController | ||||
|                     }); | ||||
|                 } | ||||
|             } | ||||
|             $danmakus = $query->orderBy("created_at", "asc")->get(); | ||||
|         } else { | ||||
|             $danmakus = []; | ||||
|         } | ||||
|         $danmakus = $query->orderBy("created_at", "asc")->paginate(20); | ||||
|         return view("danmaku.search_index", [ | ||||
|             "keyword" => $keyword, | ||||
|             "video" => $video, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user