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