efureev/laravel-support-db
| Install | |
|---|---|
composer require efureev/laravel-support-db |
|
| Latest Version: | v5.5.0 |
| PHP: | >=8.5 |
| Laravel: | 13 |
| Older releases: | 7 – 12 |
| License: | MIT |
| Last Updated: | Sep 12, 2026 |
| Links: | GitHub · Packagist |
laravel-support-db
PostgreSQL features for Laravel's schema and query builders.
Laravel's builders cover what every database can do. This package adds the PostgreSQL parts they
leave out — partial indexes, views, CREATE TABLE … LIKE, extensions, RETURNING, and the
PostgreSQL-only column types — using the same fluent style, so they read like the rest of a
migration.
It extends; it does not replace. Everything the framework already does keeps working unchanged.
Schema::create('users', static function (Blueprint $table) {
$table->primaryUUID();
$table->string('email');
$table->softDeletes();
// one live user per address; soft-deleted rows do not collide
$table->uniquePartial('email')->whereNull('deleted_at');
});
Install
composer require efureev/laravel-support-db
It registers itself through package discovery — no provider to add, no config to publish. Type-hint
the package's Blueprint in migrations to get the additions in your editor:
use Illuminate\Support\Facades\Schema;
use Php\Support\Laravel\Database\Schema\Postgres\Blueprint;
Schema::create('table', static function (Blueprint $table) { /* … */ });
| Version | |
|---|---|
| PHP | >= 8.5 |
| Laravel | >= 13.0 (illuminate/database) |
| PostgreSQL | 13 – 18, every one of them exercised in CI |
compression() needs PostgreSQL 14 and nullsNotDistinct() needs 15; everything else works from
13. The package takes effect on pgsql connections only — other drivers on the same application
are untouched.
Documentation
Read it at https://efureev.github.io/laravel-support-db/, or as markdown in
docs/.
The
docs/directory is not shipped in the Composer package — it would be dead weight invendor/— which is why the links below are absolute.
| Page | Covers |
|---|---|
| Getting started | Requirements, version floors, how the package hooks in, a first migration |
| Columns | The PostgreSQL-only column types, UUID key generation, TOAST compression |
| Indexes | Partial and unique-partial indexes, predicates, modifiers, GIN operator classes |
| Views | Plain and materialized views — create, refresh, inspect, drop, other schemas |
| Schema operations | CREATE TABLE … LIKE / AS TABLE / AS SELECT, DROP … CASCADE, extensions |
| Query builder | RETURNING on UPDATE and DELETE |
| Recipes | Thirteen realistic problems worked end to end |
| Behaviour notes | The things that are easy to trip over, and what Laravel 13 already does itself |
| Testing & contributing | Running the suite, and the gate a pull request has to pass |
What it adds
Partial and unique-partial indexes with a fluent WHERE · CREATE INDEX CONCURRENTLY and
NULLS NOT DISTINCT on them · GIN indexes with an operator class · views, including materialized
ones, with schema-qualified lookups · CREATE TABLE … LIKE / AS SELECT / AS TABLE ·
DROP TABLE … CASCADE · CREATE / DROP EXTENSION · column compression ·
UPDATE / DELETE … RETURNING · and shorthands for bit, numeric, xml, cidr, daterange,
tsrange, the geometric types, the array types, and UUID primary keys that need no extension.
Contributing
Issues and pull requests are welcome — see Testing & contributing for the gate CI runs.
License
MIT — see LICENSE.
Related Packages
Object-oriented statement builders for MySQL, Postgres, SQLite, and SQLServer.
Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can b...
A read-only database browser for Laravel: browse your tables and their rows from...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v5.5.0 | >=8.5 | ^13.0 | MIT | |
| v5.4.0 | >=8.5 | ^13.0 | MIT | |
| v5.3.0 | >=8.5 | ^13.0 | MIT | |
| v5.2.0 | >=8.5 | ^13.0 | MIT | |
| v5.1.0 | >=8.5 | ^13.0 | MIT | |
| v5.0.5 | >=8.5 | ^13.0 | MIT | |
| v5.0.4 | >=8.5 | ^13.0 | MIT | |
| v5.0.3 | >=8.5 | ^13.0 | MIT | |
| v5.0.2 | >=8.5 | ^13.0 | MIT | |
| v5.0.1 | >=8.5 | ^13.0 | MIT | |
| v5.0.0 | >=8.5 | ^13.0 | MIT | |
| v4.0.0 | >=8.4 | ^13.0 | MIT | |
| v3.0.0 | ^8.2 | ^12.0 | MIT | |
| v2.2.1 | ^8.2 | ^11.0 | | MIT | |
| v2.2.0 | ^8.2 | ^11.0 | MIT | |
| v2.1.0 | ^8.2| | ^11.0 | MIT | |
| v2.0.0 | ^8.2| | ^11.0 | MIT | |
| v1.11.0 | ^8.1| | ^10.1 | MIT | |
| v1.10.0 | ^8.1| | ^10.1 | MIT | |
| v1.9.0 | ^8.1| | ^10.1 | MIT | |
| v1.8.1 | ^8.0| | ^8.78| | MIT | |
| v1.8.0 | ^8.0| | ^8.78| | MIT | |
| v1.7.0 | ^8.0 | ^8.78 | MIT | |
| v1.6.1 | ^8.0 | ^8.50 | MIT | |
| v1.6.0 | ^8.0 | ^8.50 | MIT | |
| v1.5.0 | ^8.0 | ^8.38 | MIT | |
| v1.4.1 | ^8.0 | ^8.38 | MIT | |
| v1.4.0 | ^8.0 | ^8.38 | MIT | |
| v1.3.1 | ^8.0 | ^8.38 | MIT | |
| v1.3.0 | ^8.0 | ^8.38 | MIT |
Showing the latest 30 of 37. See every release on Packagist