modules = $this->modules(config('litematrimony.profile.modules'), 'profile', guard_url('profile')); $this->repository = $profile; } /** * Show profile's list. * * @return response */ protected function index(PublicRequest $request) { $search = $request->search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $data = $this->repository ->pushFilter(RequestFilter::class) ->pushFilter(ProfilePublicFilter::class) ->setPresenter(ProfileListPresenter::class) ->select('profiles.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('profile::profile.names')) ->view('profile::public.profile.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show profile. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $data = $this->repository ->findBySlug($slug) ->toArray(); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('profile::profile.name')) ->view('profile::public.profile.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }