Hello @mpociot
Hope to find you well!
So, with DBAL, for SQL server, is needed to set some option. Already solver this before.
For such connections, to work out of the box, something similar to this will work.
protected function setNeededPdoSettings()
{
$connectionsSqlServer = [
'x3db_v11',
'roots_sql_server',
'imos',
];
collect($connectionsSqlServer)
->each(function ($item, $key) {
config()->set("database.connections.{$item}.options",[
\PDO::ATTR_PERSISTENT => true
]);
});
}
It puts that option on the fly, for the current execution.
I could rewrite above snipper to apply such setting to every SQL Server connection, and make a PR.
What do you think?