public function getRuns() { # Returns all test runs $runs = \App\TestRun::all(); return $runs; //$this->belongsTo('\App\Author'); }
public function postTestCreateUpdate(Request $request) { $this->validate($request, ['comments' => 'required|min:3']); $test = null; if ($request->id == null) { $test = new \App\TestRun(); } else { $test = \App\TestRun::find($request->id); } $test->passed = $request->passed; $test->comments = $request->comments; $test->merged_up_to_master = $request->merged; $test->tester_id = \Auth::id(); $test->save(); $code = \App\CodeEntry::find(\Session::get('code_id')); $code->test_run_id = $test->id; $code->save(); \Session::flash('flash_message', 'Your Test was updated.'); return redirect('/monitor/createupdatetest/' . $test->id); }