作者 lyh

gx

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