Esempio n. 1
0
 public function dashboard()
 {
     $count_users = User::all()->count();
     $count_questions = Question::all()->count();
     $count_responses = Response::all()->count();
     $count_unanswered_questions = Question::where('active', '=', '1')->whereNotIn('id', Response::distinct()->get(['question_id'])->toArray())->count();
     return View::make('dashboard', ['count_users' => $count_users, 'count_questions' => $count_questions, 'count_responses' => $count_responses, 'count_unanswered_questions' => $count_unanswered_questions]);
 }
 public function adminIndex()
 {
     $questions = Question::all();
     return View::make('admin.questions', ['questions' => $questions]);
 }