How add sslmode attribute with laminas-db

Good morning,

I use the laminas-db component to query my Postgres database in a web application. We recently made ssl mandatory when connecting to the Postgres server and I can’t find any information in the laminas-db documentation indicating how to add the “sslmode=require” attribute to the dsn used to connect. Do you have a solution for my application to connect to my database using SSL?

Thank you in advance

kind regards

Nothing special, use the dsn configuration and add the parameter there.

https://www.php.net/manual/en/ref.pdo-pgsql.connection.php