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