public function index(NewsRequest $request)
    {
        $view = $this->response->theme->listView();

        if ($this->response->typeIs('json')) {
            $function = camel_case('get-' . $view);
            return $this->repository
                ->setPresenter(\Litecms\News\Repositories\Presenter\NewsPresenter::class)
                ->$function();
        }

        $news = $this->repository->paginate();

        return $this->response->title(trans('news::news.names'))
            ->view('news::news.index', true)
            ->data(compact('news'))
            ->output();
    }