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