public function _initialize() { $openid=session('openid'); if ($openid==NULL) { return view('error'); }else{ $this->openid=$openid; } }