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