code: public function index(QuestionRequest $request)
      {
          $view = $this->response->theme->listView();
  
          if ($this->response->typeIs('json')) {
              $function = camel_case('get-' . $view);
              return $this->repository
                  ->setPresenter(\Litecms\Forum\Repositories\Presenter\QuestionPresenter::class)
                  ->$function();
          }
          
          $user_id = user_id();
          $questions = $this->repository->questions($user_id);
  
          return $this->response->title(trans('forum::question.names'))
              ->view('forum::question.index', true)
              ->data(compact('questions', 'view'))
              ->output();
      }
docs: Display a list of question.
  
  @return Response