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