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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -37,9 +37,10 @@ class ProgramVideoConstructController extends BaseController
|
||||
$full_path = Storage::url($path);
|
||||
$program_video->stop_image = str_replace("jerryyan.top", "jerryyan.net", $full_path);
|
||||
}
|
||||
$program_video->created_at = $request->post("created_at");
|
||||
$program_video->update($updatePayload);
|
||||
return view("program.construct.video.create", [
|
||||
"program_video" => $program_video
|
||||
]);
|
||||
return redirect(route("program.construct.video.list", [
|
||||
"program"=>$program_video->program_id
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user