コード例 #1
0
ファイル: TestRun.php プロジェクト: cwelect1/ART
 public function getRuns()
 {
     # Returns all test runs
     $runs = \App\TestRun::all();
     return $runs;
     //$this->belongsTo('\App\Author');
 }
コード例 #2
0
ファイル: MonitorController.php プロジェクト: stiwarih/p4
 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);
 }