Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 550 Bytes

File metadata and controls

17 lines (10 loc) · 550 Bytes

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