/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(ReportCheckCreateFormRequest $request, $id) { // $reportCheck = ReportCheck::findOrFail($id); $reportCheck->update(array('reviewDate' => $request->get('reviewDate'), 'note' => $request->get('note'), 'reviewer_id' => $request->get('reviewer'))); $reviewer = User::findOrFail($request->get('reviewer')); $reportCheck->reviewer()->associate($reviewer); $analysis = Analysis::findOrFail($request->get('analysis_id')); $reportCheck->analysis()->associate($analysis); $POrecord = POcase::findOrFail($request->get('POrecord_id')); $reportCheck->POrecord()->associate($POrecord); $reportCheck->save(); return \Redirect::to('research/ngs/projects/show/' . $POrecord->project->id)->with('message', 'Your Report Check has been updated!'); }
public function destroy($id) { $sql = \DB::update("UPDATE sampling SET analysis_id = NULL where analysis_id = " . $id); $analysis = Analysis::findOrFail($id); $analysis->delete($id); Session::flash('message', 'fue eliminado de nuestros registros.'); return redirect()->route('analisis.index'); }
public function storeStatus(Request $request) { // $analysis = Analysis::find($request->get('analysis_id')); $analysis->status = $request->get('status'); $analysis->status_note = $request->get('status_note'); $analysis->save(); return \Redirect::to('research/ngs/projects/show/' . $analysis->POrecord->project->id)->with('message', 'Your Analysis has been updated!'); }