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