改名
This commit is contained in:
+1
-3
@@ -32,9 +32,7 @@ class Command extends \Console\Command
|
||||
/** @var Gii $gii */
|
||||
$gii = Snowflake::app()->get('gii');
|
||||
|
||||
$connections = Snowflake::app()->db->get($dtl->get('databases', 'db'));
|
||||
|
||||
return $gii->run($connections, $dtl);
|
||||
return $gii->run($dtl->get('databases'), $dtl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -114,8 +114,6 @@ class Gii
|
||||
if ($this->db) {
|
||||
return $this->makeByDatabases($make, $input);
|
||||
}
|
||||
|
||||
var_dump($this->input->exists('databases'));
|
||||
if ($this->input->exists('databases')) {
|
||||
$db = $this->input->get('databases', 'db');
|
||||
$this->db = Snowflake::app()->db->get($db);
|
||||
@@ -124,6 +122,8 @@ class Gii
|
||||
}
|
||||
$array = [];
|
||||
foreach (Config::get('databases') as $key => $connection) {
|
||||
var_dump($connection);
|
||||
|
||||
$this->db = Snowflake::app()->db->get($key);
|
||||
|
||||
$array[$key] = $this->makeByDatabases($make, $input);
|
||||
@@ -137,6 +137,7 @@ class Gii
|
||||
* @param $input
|
||||
* @return array
|
||||
* @throws ComponentException
|
||||
* @throws Exception
|
||||
*/
|
||||
private function makeByDatabases($make, $input): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user