cekurte / eloquentbundle
一个用于在Symfony 2中集成Eloquent库的扩展包
v1.0.1
2016-05-03 18:58 UTC
Requires
- php: >=5.4
- illuminate/database: ~5.0
- symfony/framework-bundle: ~2.3
Requires (Dev)
- fabpot/php-cs-fixer: *
- phpunit/phpunit: ~4.5
This package is auto-updated.
Last update: 2024-09-16 02:20:03 UTC
README
- 一个简单连接Eloquent ORM和Symfony 2的桥梁(所有方法均通过php单元测试覆盖),为这个项目做出贡献吧!
如果你喜欢这个库,给我一个星标 =)。
安装
composer require cekurte/eloquentbundle
之后,在AppKernel中注册该扩展包,如下所示
// app/AppKernel.php // ... public function registerBundles() { $bundles = array( // ... new Cekurte\EloquentBundle\CekurteEloquentBundle(), // ... ); // ... return $bundles; }
配置
配置此扩展包的所有引用如下,请将其添加到您的配置文件中。
# app/config/config.yml # ... cekurte_eloquent: connection: driver: "mysql" # Default is mysql. Available too: postgres, sqlserver and sqlite. host: "127.0.0.1" # Required database: "dbname" # Required username: "user" # Required password: "pass" # Optional, default is "" charset: "utf8" # Optional, default is "utf8" collation: "utf8_unicode_ci" # Optional, default is "utf8_unicode_ci" prefix: "" # Optional, default is ""
如何使用
请参阅Eloquent ORM文档。
贡献
- 给我一个星标 =)
- 将其Fork
- 创建您的功能分支(
git checkout -b my-new-feature
) - 进行更改
- 运行测试,如果需要,为您的代码添加新的测试(
vendor/bin/phpunit
) - 提交您的更改(
git commit -am 'Added some feature'
) - 将更改推送到分支(
git push origin my-new-feature
) - 创建新的Pull Request