kdrmklabs / currency-bundle
该包为 Symfony2 应用程序提供了完整的货币汇率处理器。
v0.1
2016-08-01 00:13 UTC
Requires
- php: >=5.3.2
- gedmo/doctrine-extensions: >=2.3.1
- symfony/framework-bundle: ~2.1
This package is not auto-updated.
Last update: 2024-09-14 19:36:59 UTC
README
安装
一、以两种方式安装包。
通过将以下代码行添加到您的 composer.json 文件中,然后使用命令 composer update 更新安装此包
file: /composer.json { "require": { "kdrmklabs/currency-bundle": "dev-master", } }
现在,使用 composer 更新包
$ composer update kdrmklabs/currency-bundle
二、在 AppKernel 中启用并注册 Bundle
// file: app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Kdrmklabs\Bundle\CurrencyBundle\KdrmklabsCurrencyBundle(), // ... // Your application bundles ); }
配置包。
将 kdrmklabs_ticket 配置添加到您的 config.yml 文件中
# file: app/config/config.yml kdrmklabs_currency: default_currency: "USD"
最后,创建数据库表,更新模式并填充表
使用以下命令更新您的数据库模式
$ php app/console doctrine:schema:update --force
填充数据库