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