onezerotrash/laravel-firebird 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

onezerotrash/laravel-firebird

最新稳定版本:v0.0.1

Composer 安装命令:

composer require onezerotrash/laravel-firebird

包简介

Firebird database driver for the Laravel Framework

README 文档

README

Latest Stable Version Total Downloads License

This package adds support for the Firebird PDO Database Driver in Laravel applications. Package is a fork from harrygulliford/laravel-firebird and adds support for dialect 1.

Version Support

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

Installation

You can install the package via composer:

composer require onezerotrash/laravel-firebird

The package will automatically register itself.

Declare the connection within your config/database.php file by using firebird as the driver (use PDO::ATTR_CASE => PDO::CASE_LOWER):

'connections' => [

    'firebird' => [
        'driver'   => 'firebird',
        'host'     => env('DB_FIREBIRD_HOST', 'localhost'),
        'port'     => env('DB_FIREBIRD_PORT', '3050'),
        'database' => env('DB_FIREBIRD_DATABASE', '/path_to/database.fdb'),
        'username' => env('DB_FIREBIRD_USERNAME', 'SYSDBA'),
        'password' => env('DB_FIREBIRD_PASSWORD', 'masterkey'),
        'charset'  => env('DB_FIREBIRD_CHARSET', 'UTF8'),
        'dialect'  => env('DB_FIREBIRD_DIALECT', '3'),
        'role'     => env('DB_FIREBIRD_ROLE', 'NONE'),
        'options' => [
            PDO::ATTR_CASE => PDO::CASE_LOWER,
            PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
            PDO::ATTR_STRINGIFY_FETCHES => false,
            PDO::ATTR_EMULATE_PREPARES => false
        ]
    ],

],

Add the DB_FIREBIRD_* environment variables to your .env file, for example:

DB_FIREBIRD_HOST=localhost
DB_FIREBIRD_PORT=3050
DB_FIREBIRD_DATABASE=/opt/firebird/database.fdb
DB_FIREBIRD_USERNAME=user
DB_FIREBIRD_PASSWORD=password
DB_FIREBIRD_CHARSET=WIN1250
DB_FIREBIRD_DIALECT=3

To register this package in Lumen, you'll also need to add the following line to the service providers in your config/app.php file: $app->register(\onezerotrash\Firebird\FirebirdServiceProvider::class);

Limitations

This package does not intend to support database migrations and it should not be used for this use case.

License

Licensed under the MIT license.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 104
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-16