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