boliveirasilva / laravel-firebird
Laravel 5.4 框架的 Firebird 数据库包
v1.0.0
2022-04-06 11:29 UTC
Requires
- php: >=5.6.4
- ext-pdo: *
- illuminate/container: ~5.4
- illuminate/database: ~5.4
- illuminate/events: ~5.4
- illuminate/support: ~5.4
Requires (Dev)
- orchestra/database: *
- orchestra/testbench: 3.4.*
- phpunit/phpunit: *
This package is auto-updated.
Last update: 2024-09-11 10:18:21 UTC
README
使用此包
安装
安装 PHP 的 Firebird PDO 驱动程序。
Mariuz 的博客有很好的分步指南: http://mapopa.blogspot.com/2009/04/php5-and-firebird-pdo-on-ubuntu-hardy.html
为了支持 Laravel 5.4 使用
composer require boliveirasilva/laravel-firebird
更新 app/config/app.php,添加服务提供者
'Firebird\FirebirdServiceProvider'.
你可以移除原始的 DatabaseServiceProvider,因为原始的连接工厂也已经扩展。
在数据库配置中声明你的连接,使用 'firebird' 作为连接类型。其他需要的键
'firebird' => [ 'driver' => 'firebird', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE','/storage/firebird/APPLICATION.FDB'), 'username' => env('DB_USERNAME', 'sysdba'), 'password' => env('DB_PASSWORD', 'masterkey'), 'charset' => env('DB_CHARSET', 'UTF8'), ],
并将其添加到你的 .env 文件中
DB_CHARSET=UTF8
如有必要,将 UTF8 改为任何其他字符集
此包仍处于初期阶段,我目前不会推荐将其用于大型项目,或者在没有定期备份数据库的情况下使用。
欢迎任何评论或贡献。