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