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