repository = $tabela1; parent::__construct(); } /** * Show tabela1's list. * * @param string $slug * * @return response */ protected function index() { $tabela1s = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->theme->of('teste::public.tabela1.index', compact('tabela1s'))->render(); } /** * Show tabela1. * * @param string $slug * * @return response */ protected function show($slug) { $tabela1 = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->theme->of('teste::public.tabela1.show', compact('tabela1'))->render(); } }