Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="col-xs-12 col-sm-12 col-md-12">
- <div class="form-group">
- <strong>Kelas:</strong>
- {!! Form::select('idkelas', $kelas_theresia, [], array('class' => 'form-control')) !!}
- </div>
- </div>
- public function edit($id)
- {
- $kamar_theresia = Kamar_Theresia::find($id);
- $kelas_theresia = Kelas_Theresia::pluck('name','id')->all();
- return view('kamar_theresia.edit',compact('kamar_theresia','kelas_theresia'));
- }
- /**
- * Update the specified resource in storage.
- *
- * @param IlluminateHttpRequest $request
- * @param AppProduct $product
- * @return IlluminateHttpResponse
- */
- public function update(Request $request, $id)
- {
- request()->validate([
- 'nama' => 'required',
- 'idkelas' => 'required',
- 'ketersediaan' => 'required',
- ]);
- $input = $request->all();
- $kamar_theresia = Kamar_Theresia::find($id);
- $kamar_theresia->update($input);
- return redirect()->route('kamar_theresia.index')
- ->with('success','Kamar Theresia updated successfully');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement