getHomeInformation(); $incData = IncInfoModel::get(1); $this->assign('information', $getHomeInformation); $this->assign('incData', $incData); $location = json_decode($incData->inc_location); $this->assign('lng', $location->lng); $this->assign('lat', $location->lat); return $this->fetch(); } public function isLogin() { $userId = session('user_id'); if ($userId) { return ["success"=>true]; } else { return ["success"=>false]; } }//end index() }