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