modules = $this->modules(config('litematrimony.profile.modules'), 'request', guard_url('request')); $this->repository = $request; } /** * Show request'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(RequestPublicFilter::class) ->setPresenter(RequestListPresenter::class) ->select('requests.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('profile::request.names')) ->view('profile::public.request.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show request. * * @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::request.name')) ->view('profile::public.request.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }