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