Esempio n. 1
0
 /**
  * @return \Illuminate\View\View
  */
 public function getRegistrationSurveys(Request $request, SurveyMetricsRepository $metrics)
 {
     $seasons = Season::orderBy('id', 'DESC')->get();
     $currentSeason = $request->has('seasonId') ? Season::findOrFail($request->get('seasonId')) : $seasons->first();
     $questions = [];
     foreach (RegistrationSurveyQuestion::orderBy('order')->get() as $question) {
         $questions[$question->id] = ['question' => $question, 'metrics' => $metrics->byQuestion($question, $currentSeason)];
     }
     return view('admin.reports.registration-surveys', ['currentSeason' => $currentSeason, 'seasons' => $seasons, 'questions' => $questions]);
 }
Esempio n. 2
0
 /**
  * @return \Illuminate\View\View
  */
 public function getSetup()
 {
     return view('account.setup')->withQuestions(RegistrationSurveyQuestion::orderBy('order')->get());
 }