repository = $asd; parent::__construct(); } /** * Show asd's list. * * @param string $slug * * @return response */ protected function index() { $asds = $this->repository->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->theme->of('ad::public.asd.index', compact('asds'))->render(); } /** * Show asd. * * @param string $slug * * @return response */ protected function show($slug) { $asd = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->theme->of('ad::public.asd.show', compact('asd'))->render(); } }