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