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