Skip to content

Commit 0043076

Browse files
authored
fix: Incorrect configuration information read (#39)
* 读取配置信息问题 读取配置信息键名有问题 * 从配置文件读取 * Update 20181113071924_create_rules_table.php
1 parent 9b635f2 commit 0043076

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

database/migrations/20181113071924_create_rules_table.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ protected function init()
2929
*/
3030
protected function getDbConfig(): array
3131
{
32-
$default = config('tauthz.database.connection') ?: config('database.default');
33-
34-
$config = config("database.connections.{$default}");
32+
$default = config('tauthz.default');
33+
$connection = config("tauthz.enforcers.{$default}.database.connection") ?: config('database.default');
34+
35+
$config = config("database.connections.{$connection}");
3536

3637
if (0 == $config['deploy']) {
3738
$dbConfig = [

0 commit comments

Comments
 (0)