Browse Source

Eloquent db persistent connection (#4575)

Joan Miquel 6 years ago
parent
commit
7cffd9d035
1 changed files with 3 additions and 0 deletions
  1. 3 0
      frameworks/PHP/php/eloquent/init-capsule.php

+ 3 - 0
frameworks/PHP/php/eloquent/init-capsule.php

@@ -13,6 +13,9 @@ $capsule->addConnection([
     'database' => 'hello_world',
     'username' => 'benchmarkdbuser',
     'password' => 'benchmarkdbpass',
+    'options'=> [
+        PDO::ATTR_PERSISTENT => true,
+    ],
 ]);
 
 $capsule->setAsGlobal();