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