Example #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(KelasRequest $request, Kelas $kelas)
 {
     $kelas->update($request->all());
     return redirect('/kelas');
 }
Example #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(KelasRequest $request, $id)
 {
     //
     $input = $request->all();
     $kelas = Kelas::find($id);
     if ($kelas->update($input)) {
         return response()->json(array('success' => TRUE));
     }
 }