/**
  * Show the form for creating a new resource.
  *
  * @param Question $question
  *
  * @return \Illuminate\Http\Response
  */
 public function create(Question $question)
 {
     $availableActions = [];
     // get actions that hasn't not been used
     foreach ($question->getAvailableActions() as $action) {
         $availableActions[$action->id] = $action->name;
     }
     return view('admin/action/create', compact('question', 'availableActions'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param Question $question
  *
  * @return \Illuminate\Http\Response
  */
 public function edit(Question $question)
 {
     $availableTags = Question::existingTags()->pluck('name', 'slug');
     $availableActions = [];
     // get actions that hasn't not been used
     foreach ($question->getAvailableActions() as $action) {
         $availableActions[$action->id] = $action->name;
     }
     return view('admin/question/edit', compact('question', 'availableTags', 'availableActions'));
 }