/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $user = \Auth::user();
     $term = 'First Term';
     if ($_GET['class']) {
         $this->class = $_GET['class'];
         $this->subject = $_GET['subject'];
         \Session::put('class', $_GET['class']);
         \Session::put('subject', $_GET['subject']);
     }
     $classe_id = Classe::where('name', $this->class)->first()->id;
     $subject_id = Subject::where('name', $this->subject)->first()->id;
     $count = 1;
     $questions = Question::where('classe_id', $classe_id)->where('subject_id', $subject_id)->get();
     return view('admin.questions.index', compact('questions', 'count', 'subject_id', 'classe_id', 'term', 'user'));
 }