PHPackages                             marcha/laravel-firebird - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. marcha/laravel-firebird

ActiveLibrary[Database &amp; ORM](/categories/database)

marcha/laravel-firebird
=======================

A Firebird database package for the Laravel Framework

0914↓58.3%1PHP

Since Jun 19Pushed 2mo agoCompare

[ Source](https://github.com/marcha/laravel-firebird)[ Packagist](https://packagist.org/packages/marcha/laravel-firebird)[ RSS](/packages/marcha-laravel-firebird/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (5)Used By (1)

laravel-firebird
================

[](#laravel-firebird)

This package adds support for the Firebird PDO driver in Laravel applications. Support for Laravel 5.5 to 8.x with PHP 7.1+ and Firebird 1.5, 2.5, 3.0

Installation
------------

[](#installation)

Install the Firebird PDO driver for PHP.

Mariuz's Blog has a very good step by step on this:

Install using composer:

```
composer require marcha/laravel-firebird
```

Update the `app/config/app.php`, add the service provider:

```
'Firebird\FirebirdServiceProvider'.
```

For Laravel 5.7 and later:

```
Firebird\FirebirdServiceProvider::class,
```

You can remove the original DatabaseServiceProvider, as the original connection factory has also been extended.

Declare your connection in the database config, using 'firebird' as the connecion type. Other keys that are needed:

```
'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'),
    'role'     => 'RDB$ADMIN',
    'engine_version' => '3.0.4',
],
```

And add to your .env

```
DB_CHARSET=UTF8

```

If necessary, change the UTF8 to any other charset

This package is a branch jacquestvanzuydam/laravel-firebird package and extends its functionality. Tested on Laravel-5.7.

Added the following features:

- Added support for direct control sequences in

```
        // CREATE SEQUENCE "seq_users_id"
        Schema::createSequence('seq_users_id');

        // ALTER SEQUENCE "seq_users_id" RESTART WITH 10 INCREMENT BY 5
        Schema::sequence('seq_users_id', function (SequenceBlueprint $sequence) {
            $sequence->increment(5);
            $sequence->restart(10);
        });

        // DROP SEQUENCE "seq_users_id"
        Schema::dropSequence('seq_users_id');
```

- The implementation of auto-increment columns in two ways:
- through the automatic generation of sequences and before insert trigger

```
        // CREATE TABLE "users" (
        //   "id"              INTEGER NOT NULL PRIMARY KEY,
        //   "name"            VARCHAR(255) NOT NULL,
        //   "email"           VARCHAR(255) NOT NULL,
        //   "password"        VARCHAR(255) NOT NULL,
        //   "remember_token"  VARCHAR(100),
        //   "created_at"      TIMESTAMP,
        //   "updated_at"      TIMESTAMP
        // );
        // ALTER TABLE "users" ADD PRIMARY KEY ("id");
        // ALTER TABLE "users" ADD CONSTRAINT "users_email_unique" UNIQUE ("email");
        // CREATE SEQUENCE "seq_users";
        // CREATE OR ALTER TRIGGER "tr_users_bi" FOR "users"
        // ACTIVE BEFORE INSERT
        // AS
        // BEGIN
        //   IF (NEW."id" IS NULL) THEN
        //     NEW."id" = NEXT VALUE FOR "seq_users";
        // END
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });

        // DROP TABLE "users";
        // DROP SEQUENCE "seq_users";
        Schema::drop('users');
```

- using identity fields (only in Firebird 3.0).

```
        // CREATE TABLE "users" (
        //   "id"              INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
        //   "name"            VARCHAR(255) NOT NULL,
        //   "email"           VARCHAR(255) NOT NULL,
        //   "password"        VARCHAR(255) NOT NULL,
        //   "remember_token"  VARCHAR(100),
        //   "created_at"      TIMESTAMP,
        //   "updated_at"      TIMESTAMP
        // );
        // ALTER TABLE "users" ADD CONSTRAINT "users_email_unique" UNIQUE ("email");
        Schema::create('users', function (Blueprint $table) {
            $table->useIdentity(); // only Firebird 3.0
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });
```

- The implementation of InsertGetId method is similar to the postgres, ie using RETURNING proposal.
- Create your own base model class in which insertAndSetId method is implemented through the prior receipt by the sequence identifier.
- Added additional methods for the execution of stored procedures and stored functions.
- Added Providing the connection parameters: the name of the role and Firebird version (to use the correct grammar).

Credits
-------

[](#credits)

This package was originally forked from [sim1984/laravel-firebird](https://github.com/sim1984/laravel-firebird).

License
-------

[](#license)

Licensed under the [MIT](https://choosealicense.com/licenses/mit/) licence.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance56

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3828422?v=4)[Nikola Marčić](/maintainers/marcha)[@marcha](https://github.com/marcha)

---

Top Contributors

[![sim1984](https://avatars.githubusercontent.com/u/19909652?v=4)](https://github.com/sim1984 "sim1984 (32 commits)")[![marcha](https://avatars.githubusercontent.com/u/3828422?v=4)](https://github.com/marcha "marcha (21 commits)")[![jacquestvanzuydam](https://avatars.githubusercontent.com/u/2675042?v=4)](https://github.com/jacquestvanzuydam "jacquestvanzuydam (9 commits)")[![ricardoseriani](https://avatars.githubusercontent.com/u/3369718?v=4)](https://github.com/ricardoseriani "ricardoseriani (2 commits)")[![fesoft](https://avatars.githubusercontent.com/u/9648452?v=4)](https://github.com/fesoft "fesoft (1 commits)")[![donnykurnia](https://avatars.githubusercontent.com/u/95402?v=4)](https://github.com/donnykurnia "donnykurnia (1 commits)")[![mariuz](https://avatars.githubusercontent.com/u/18359?v=4)](https://github.com/mariuz "mariuz (1 commits)")[![douglasresendemaciel](https://avatars.githubusercontent.com/u/11336192?v=4)](https://github.com/douglasresendemaciel "douglasresendemaciel (1 commits)")

### Embed Badge

![Health badge](/badges/marcha-laravel-firebird/health.svg)

```
[![Health](https://phpackages.com/badges/marcha-laravel-firebird/health.svg)](https://phpackages.com/packages/marcha-laravel-firebird)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
