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