Download the PHP package haakco/laravel-postgres-helper without Composer
On this page you can find all versions of the php package haakco/laravel-postgres-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download haakco/laravel-postgres-helper
More information about haakco/laravel-postgres-helper
Files in haakco/laravel-postgres-helper
Package laravel-postgres-helper
Short Description Helper functions for postgres in Laravel
License MIT
Homepage https://github.com/haakco/laravel-postgres-helper
Informations about the package laravel-postgres-helper
Laravel PostgreSQL Helper
A comprehensive PostgreSQL utility package for Laravel applications that provides automatic sequence management, trigger automation, and database health monitoring.
Installation
Requirements
- PHP 8.3+
- Laravel 10, 11, or 12
- PostgreSQL 13+
Testing
Prerequisites
The integration tests require a PostgreSQL database. You have three options:
Option 1: Docker Compose (Recommended)
Docker Services:
- Main Database:
localhost:5432
(database:laravel_postgres_helper
) - Test Database:
localhost:5433
(database:laravel_postgres_helper_test
) - Username:
postgres
/ Password:postgres
- PostgreSQL Version: 16 with extensions (TimescaleDB, PostGIS, pg_stat_statements)
Note: The Docker setup uses development-optimized settings (fsync=off) for better performance. Never use these settings in production!
Option 2: Justfile Commands
Option 3: Manual Setup
-
Copy the test environment file:
- The default configuration uses Docker Compose settings:
Running Tests
Development Commands
Justfile Commands
Upgrading from v3.x to v4.x
When upgrading from version 3.x to 4.x, the package includes a migration that will automatically update your PostgreSQL functions to the latest versions:
The migration 2025_01_25_000001_update_postgres_helper_functions_v4.php
will:
- Update all PostgreSQL helper functions to their latest definitions
- Add a comment to track the update
- Use
CREATE OR REPLACE
so it's safe to run multiple times
If you prefer to update manually without migrations:
Usage
Basic Usage
Health Checks
Troubleshooting
Docker Issues
Port Conflicts:
If you have PostgreSQL already running locally, change the ports in your .env
file:
Connection Issues:
Reset Databases:
Test Database Issues
"uuid_generate_v4() does not exist" error:
License
MIT
All versions of laravel-postgres-helper with dependencies
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0