vcromeiro / laravel-firebird
Laravel 框架的 Firebird 数据库驱动
v2.2.2
2021-07-22 15:41 UTC
Requires
- php: >=7.1
- illuminate/container: ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
- illuminate/database: ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
- illuminate/events: ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
- illuminate/support: ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
Requires (Dev)
- mockery/mockery: ~1.0
- orchestra/testbench: ~3.7|^4.0|^5.0|^6.0
- phpunit/phpunit: ~7.0|^8.0|^9.0
README
此包为 Laravel 应用程序添加了 Firebird PDO 驱动的支持。支持 Laravel 5.5 到 8.x,以及 PHP 7.1+ 和 Firebird 1.5 或 2.5
安装
您可以通过 composer 安装此包
composer require vcromeiro/laravel-firebird
该包将自动注册自己。
在您的 config/database.php
文件中声明连接,使用 firebird
作为驱动
'connections' => [ 'firebird' => [ 'driver' => 'firebird', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3050'), 'database' => env('DB_DATABASE', '/path_to/database.fdb'), 'username' => env('DB_USERNAME', 'sysdba'), 'password' => env('DB_PASSWORD', 'masterkey'), 'charset' => env('DB_CHARSET', 'UTF8'), 'version' => env('DB_VERSION', '2.5'), // Supported versions: 2.5, 1.5 'role' => null, ], ],
要在 Lumen 中注册此包,您还需要将以下行添加到您的 config/app.php
文件中的服务提供者: $app->register(\Firebird\FirebirdServiceProvider::class);
限制
此包不支持数据库迁移,因此不应用于此用途。
致谢
此包最初是从 acquestvanzuydam/laravel-firebird 分支出来的,并从 sim1984/laravel-firebird 和 harrygulliford/laravel-firebird 中获得了增强。
许可证
在 MIT 许可证下发布。