public function index() { $where["questions.question_type"] = 2; $data['public_questions'] = Question::GetActiveQuestions($where)->take(3); $where["questions.question_type"] = 1; $data['private_questions'] = Question::GetActiveQuestions($where)->take(3); $data['archived_questions'] = Question::where("active", 0)->get()->take(3); return view('home', $data); }
public function privateQuestions() { $where["questions.question_type"] = 1; $data['questions'] = Question::GetActiveQuestions($where); $data['title'] = "Private"; return view('questions.index')->with($data); }