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