search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Ledger::pushScope(new RequestScope()) ->pushScope(new LedgerPublicScope()) ->paginate($pageLimit) ->withQueryString(); $ledgers = new LedgersCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('account::ledger.names')) ->view('account::public.ledger.index') ->data(compact('ledgers', 'categories', 'tags', 'recent')) ->output(); } /** * Show ledger. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Ledger::findBySlug($slug); $data = new LedgerResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('account::ledger.name')) ->view('account::public.ledger.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }