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