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