Skip to content

This is fix for Laravel when pgbouncer enabled with parameter 'PDO::ATTR_EMULATE_PREPARES => true'

Notifications You must be signed in to change notification settings

t1nkl/Laravel-PostgreSQL-pgbouncer-Fix

Repository files navigation

Laravel Fix For PostgreSQL 'pgbouncer'

This is a small fix for boolean values in Laravel, when PostgreSQL connection set-up with parameter:

PDO::ATTR_EMULATE_PREPARES => true

Instruction:

  • Copy PostgresConnection.php in App\Database folder
  • Connect PostgresConnection class in AppServiceProvider.php file like in example
  • Add casts in you models for all boolean values

Alternative

Same logic but with composer installation

About

This is fix for Laravel when pgbouncer enabled with parameter 'PDO::ATTR_EMULATE_PREPARES => true'

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages