auth = session('frontend_auth') ?? []; $this->data['auth'] = $this->auth; $this->authId = $this->auth['id'] ?? 0; } //设置SEO信息 protected function setSeo($title = '', $keywords = '', $description = '') { $this->data['seoTitle'] = $title ?: $this->system['seo_title'] ?? ''; $this->data['seoKeywords'] = $keywords ?: $this->system['seo_keywords'] ?? ''; $this->data['seoDescription'] = $description ?: $this->system['seo_description'] ?? ''; } //模板 protected function view($template = '') { return view($template)->assign($this->data); } }