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

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

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

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