search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Whitepaper::pushScope(new RequestScope()) ->pushScope(new WhitepaperPublicScope()) ->select('whitepapers.*') ->paginate($pageLimit) ->withQueryString(); $data = new WhitepapersCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('whitepaper::whitepaper.names')) ->view('whitepaper::public.whitepaper.index') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } /** * Show whitepaper. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Whitepaper::findBySlug($slug); $data = new WhitepaperResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('whitepaper::whitepaper.name')) ->view('whitepaper::public.whitepaper.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }