コード例 #1
0
 /**
  * Show result for specific user.
  *
  * @param $user
  * @param bool|int $monthsBack Score for specific month
  * @param bool|int $fromMonthsBack Score starting this amount of months back
  * @return mixed
  */
 public function resultForUser($user, $monthsBack = false, $fromMonthsBack = false)
 {
     $repos = new ResultsRepository();
     $results = $repos->getByUser($user, $monthsBack, $fromMonthsBack);
     return $results;
 }
コード例 #2
0
 /**
  * Show result for specific user.
  *
  * @param $user
  * @param Request $request
  * @return mixed
  */
 public function resultForUser($user, Request $request)
 {
     $repos = new ResultsRepository();
     $results = $repos->getByUser($user, $request->input('monthsBack', false), $request->input('fromMonthsBack', false));
     return view('game-of-tests::results.author', ['results' => $results]);
 }