setDescription('install db from hyperf-admin.'); } public function handle() { $db_conf = config('databases.hyperf_admin'); if (!$db_conf || !$db_conf['host']) { $this->output->error('place set hyperf_admin db config in env'); } $sql = file_get_contents(__DIR__ . '/install.sql'); $re = Db::connection('hyperf_admin')->getPdo()->exec($sql); $this->output->success('hyperf-admin db install success'); } }