andersonav/firebird-connector

Firebird数据库驱动程序,适用于Laravel框架

v3.0.0 2024-10-02 21:11 UTC

This package is auto-updated.

Last update: 2024-10-02 21:14:38 UTC


README

Latest Stable Version Total Downloads Tests License

此包为Laravel应用程序添加对Firebird PDO数据库驱动程序的支持。

版本支持

  • PHP 7.4, 8.0, 8.1, 8.2
  • Laravel: 8.x, 9.x, 10.x
  • Firebird 2.5, 3.0, 4.0

安装

您可以通过composer安装此包

composer require andersonav/firebird-connector

此包将自动注册自身。

在您的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'),
        'role'     => null,
    ],

],

为了在Lumen中注册此包,您还需要在config/app.php文件中的服务提供者中添加以下行:$app->register(\AndersonAv\Firebird\FirebirdServiceProvider::class);

限制

此包不支持数据库迁移,不应用于此用例。

致谢

许可证

许可协议为MIT