repository = $care_provider; parent::__construct(); } /** * Show care_provider's list. * * @param string $slug * * @return response */ protected function index() { $care_providers = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->setMetaTitle(trans('care_provider::care_provider.names')) ->view('care_provider::public.care_provider.index') ->data(compact('care_providers')) ->output(); } /** * Show care_provider. * * @param string $slug * * @return response */ protected function show($slug) { $care_provider = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($care_provider->name . trans('care_provider::care_provider.name')) ->view('care_provider::public.care_provider.show') ->data(compact('care_provider')) ->output(); } }