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