样式及详情等

This commit is contained in:
2022-07-29 17:12:24 +08:00
parent a0aa7fd81c
commit ac85b2558a
12 changed files with 21071 additions and 35 deletions

View File

@ -10,10 +10,19 @@ class ProgramQueryController extends BaseController
{
public function index(Request $request) {
$keyword = $request->get("keyword", "");
$programs = Programs::query()->with(["appends", "video_pivots.video"])->where("status", "=", 1)->limit(15)->orderByDesc("created_at")->get();
$programs = Programs::query()->with(["appends", "video_pivots.video"])
->where("status", "=", 1)->limit(15)->orderByDesc("created_at")
->paginate();
return view("program.index", [
"keyword" => $keyword,
"programs"=>$programs,
]);
}
public function videos(Request $request, Programs $program) {
return view("program.video.index", [
"program" => $program,
"videos" => $program->video_pivots,
]);
}
}