yii2-module / yii2-export
一个将数据从数据库导出的模块
7.0.5
2024-07-31 16:59 UTC
Requires
Requires (Dev)
- dev-master
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.2
- 4.0.1
- 4.0.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.2.0
- 1.1.0
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-08-31 15:09:17 UTC
README
一个从数据库导出数据的模块。
安装
此库的安装通过composer进行,并且此库中所有类的自动加载通过其自动加载器完成。
- 从他们的网站下载
composer.phar
。 - 然后运行以下命令将此库作为依赖项安装
php composer.phar install yii2-module/yii2-export ^7
配置
此模块需要在配置级别设置以下组件
- 'db_export' 应该是一个
\yii\db\Connection
如果您已经有了数据库连接,可以使用以下技巧
'db_export' => function() { return \Yii::$app->get('db'); },
其中 'db' 是您的数据库连接的id。
此模块使用以下参数在配置级别设置
- 无
然后,模块应按以下方式配置(在 console.php
或 web.php
中)
$config = [
...
'modules' => [
...
'export' => [
'class' => 'Yii2Module\Yii2Export\ExportModule',
],
...
],
...
];
许可证
MIT(见 许可证文件)