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