Пример #1
0
 /**
  * Update the specified reportcolumn in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($report_id, $id)
 {
     $reportcolumn = ReportColumn::findOrFail($id);
     ReportColumn::setRules('update');
     $data = Input::all();
     if (!$reportcolumn->canUpdate()) {
         return $this->_access_denied();
     }
     if (!$reportcolumn->update($data)) {
         return $this->_validation_error($reportcolumn);
     }
     if (Request::ajax()) {
         return $reportcolumn;
     }
     Session::remove('_old_input');
     return Redirect::action('ReportColumnsController@edit', [$report_id, $id])->with('notification:success', $this->updated_message);
 }