You've already forked lubo_comment_query
样式及详情等
This commit is contained in:
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user