/** * Store a newly created reporteager in storage. * * @return Response */ public function store($report_id) { $data = Input::all(); ReportEager::setRules('store'); if (!ReportEager::canCreate()) { return $this->_access_denied(); } $reporteager = new Reporteager(); $data['report_id'] = $report_id; $reporteager->fill($data); if (!$reporteager->save()) { return $this->_validation_error($reporteager); } if (Request::ajax()) { return Response::json($reporteager, 201); } return Redirect::action('ReportEagersController@index', $report_id)->with('notification:success', $this->created_message); }