예제 #1
0
 /**
  * @param  $id
  * @param  EditQuestionRequest $request
  * @return mixed
  */
 public function edit($id, EditQuestionRequest $request)
 {
     $question = $this->questions->findOrThrowException($id);
     return view('backend.quiz.questions.edit')->withQuestion($question)->withQuestionCategories(old('question_categories') ?: $question->categories()->lists('id')->all())->withQuestionAnswers($question->answers()->orderBy('id')->get())->withCategories($this->categories->getRootsCategories());
 }
예제 #2
0
 /**
  * @param  $id
  * @param  EditPollRequest $request
  * @return mixed
  */
 public function edit($id, EditPollRequest $request)
 {
     $poll = $this->polls->findOrThrowException($id);
     return view('backend.quiz.polls.edit')->withPoll($poll)->withCategories($this->categories->getAllCategories());
 }