自动保存最新时间
This commit is contained in:
parent
16fba66527
commit
6471d7bd47
@ -26,7 +26,6 @@ class ProgramConstructController extends BaseController
|
||||
public function submit(Request $request, Programs $program) {
|
||||
$updatePayload = $request->only(["name", "difficulty", "desc"]);
|
||||
$program->status = $request->post("status", 0);
|
||||
$program->created_at = $request->post("created_at");
|
||||
$program->update($updatePayload);
|
||||
return view("program.construct.create", [
|
||||
"program"=>$program
|
||||
|
@ -41,6 +41,12 @@ class ProgramVideoConstructController extends BaseController
|
||||
}
|
||||
$program_video->created_at = $request->post("created_at");
|
||||
$program_video->update($updatePayload);
|
||||
/**
|
||||
* @var $program Programs
|
||||
*/
|
||||
$program = $program_video->program;
|
||||
$program->created_at = $program->video_pivots()->first()->created_at;
|
||||
$program->save();
|
||||
return redirect(route("program.construct.video.list", [
|
||||
"program"=>$program_video->program_id
|
||||
]));
|
||||
|
@ -21,10 +21,6 @@
|
||||
节目要求
|
||||
<input class="form-input border-0 border-b-2 w-full" type="text" name="desc" value="{{$program->desc}}">
|
||||
</label>
|
||||
<label class="block my-2">
|
||||
节目开打时间
|
||||
<input class="form-input border-0 border-b-2 w-full" type="datetime-local" step="1" name="created_at" value="{{$program->created_at}}">
|
||||
</label>
|
||||
<label class="block my-2">
|
||||
是否结束维护
|
||||
<input class="form-checkbox" type="checkbox" name="status" value="1" @if($program->status == 1) checked @endif>
|
||||
|
Loading…
x
Reference in New Issue
Block a user