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