Exemplo n.º 1
0
 /**
  * Update the specified rekor in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $rekor = Rekor::findOrFail($id);
     $validator = Validator::make($data = Input::all(), Rekor::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $rekor->update($data);
     return Redirect::route('admin.rekors.index')->with('successMessage', 'Rekor berhasil diubah');
 }