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('school::download.names')) ->view('school::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('school::download.name')) ->view('school::public.download.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }