-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Incorrect configuration information read #39
Conversation
@@ -29,7 +29,7 @@ protected function init() | |||
*/ | |||
protected function getDbConfig(): array | |||
{ | |||
$default = config('tauthz.database.connection') ?: config('database.default'); | |||
$default = config('tauthz.enforcers.basic.database.connection') ?: config('database.default'); | |||
|
|||
$config = config("database.connections.{$default}"); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhangyue0503 First you should get the default enforcer
, and then get the database.connection
in it.
$default = config('tauthz.default');
$connection = config("tauthz.enforcers.{$default}.database.connection") ?: config('database.default');
$config = config("database.connections.{$connection}");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没毛病,还是要走配置文件,我给直接写死了
@zhangyue0503 You seem to have forgotten to modify the last line of code. |
🎉 This PR is included in version 1.5.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
读取配置信息键名有问题
不过读对了也没用,think-migration 有问题,已经向那边提交了 issue 数据库迁移脚本向不同的连接库迁移问题