作者 lyh

gx

@@ -37,8 +37,6 @@ class LoginAuthMiddleware @@ -37,8 +37,6 @@ class LoginAuthMiddleware
37 } 37 }
38 // 设置数据库 38 // 设置数据库
39 $project = ProjectServer::useProject($info['project_id']); 39 $project = ProjectServer::useProject($info['project_id']);
40 - var_dump($project);  
41 - die();  
42 if(empty($project)){ 40 if(empty($project)){
43 return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'数据库未配置']); 41 return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'数据库未配置']);
44 } 42 }
@@ -31,6 +31,8 @@ class ProjectServer extends BaseService @@ -31,6 +31,8 @@ class ProjectServer extends BaseService
31 if(!$project->mysqlConfig){ 31 if(!$project->mysqlConfig){
32 return false; 32 return false;
33 } 33 }
  34 + var_dump($project->mysqlConfig);
  35 + die();
34 // 设置 database.connections.custom_mysql 配置 36 // 设置 database.connections.custom_mysql 配置
35 config(['database.connections.custom_mysql.host' => $project->mysqlConfig->host]); 37 config(['database.connections.custom_mysql.host' => $project->mysqlConfig->host]);
36 config(['database.connections.custom_mysql.port' => $project->mysqlConfig->port]); 38 config(['database.connections.custom_mysql.port' => $project->mysqlConfig->port]);