作者 lyh

gx

@@ -220,7 +220,7 @@ class ProjectLogic extends BaseLogic @@ -220,7 +220,7 @@ class ProjectLogic extends BaseLogic
220 if($param['type'] == Project::TYPE_ONE){ 220 if($param['type'] == Project::TYPE_ONE){
221 //初始化数据库 221 //初始化数据库
222 if(isset($param['mysql_id']) && !empty($param['mysql_id'])){ 222 if(isset($param['mysql_id']) && !empty($param['mysql_id'])){
223 -// $this->initializationMysql($param['id']); 223 + $this->initializationMysql($param['id']);
224 } 224 }
225 //初始账号 225 //初始账号
226 if(isset($param['mobile']) && !empty($param['mobile'])){ 226 if(isset($param['mobile']) && !empty($param['mobile'])){
@@ -32,8 +32,9 @@ class ProjectServer extends BaseService @@ -32,8 +32,9 @@ class ProjectServer extends BaseService
32 if(!$project->mysqlConfig){ 32 if(!$project->mysqlConfig){
33 return false; 33 return false;
34 } 34 }
35 - // 设置 database.connections.custom_mysql 配置  
36 $encrypt = new EncryptUtils(); 35 $encrypt = new EncryptUtils();
  36 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($encrypt->unlock_url($project->mysqlConfig->port), true) . PHP_EOL, FILE_APPEND);
  37 + // 设置 database.connections.custom_mysql 配置
37 config(['database.connections.custom_mysql.host' => $project->mysqlConfig->host]); 38 config(['database.connections.custom_mysql.host' => $project->mysqlConfig->host]);
38 config(['database.connections.custom_mysql.port' => (int)$encrypt->unlock_url($project->mysqlConfig->port)]); 39 config(['database.connections.custom_mysql.port' => (int)$encrypt->unlock_url($project->mysqlConfig->port)]);
39 config(['database.connections.custom_mysql.database' => $project->databaseName()]); 40 config(['database.connections.custom_mysql.database' => $project->databaseName()]);