public function addQuestion($id)
 {
     $in = Input::all();
     $rules = ['question' => 'required', 'choiceA' => 'required', 'choiceB' => 'required', 'choiceC' => 'required', 'choiceD' => 'required', 'answer' => 'required'];
     $validation = Validator::make($in, $rules);
     if ($validation->passes()) {
         $quizItemID = QuizItem::create(['question' => $in['question'], 'quizID' => $id])->id;
         QuizItemChoice::create(['choice1' => $in['choiceA'], 'choice2' => $in['choiceB'], 'choice3' => $in['choiceC'], 'choice4' => $in['choiceD'], 'quizItemID' => $quizItemID]);
         QuizItemAnswer::create(['answer' => $in['answer'], 'quizItemID' => $quizItemID]);
         return Redirect::to('/')->with('message', 'Question successfully added')->with('url', '/quiz/view/' . $id);
     } else {
         return Redirect::to('/')->with('message', 'Error in adding question');
     }
 }