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