Skip to content

Instantly share code, notes, and snippets.

@kelixlabs
Created November 13, 2015 02:17
Show Gist options
  • Save kelixlabs/5e7737b4fa4904478a0f to your computer and use it in GitHub Desktop.
Save kelixlabs/5e7737b4fa4904478a0f to your computer and use it in GitHub Desktop.
Laravel 4.2 PDO persistent connection
<?php
return array(
/* other settings removed for brevity */
'connections' => array(
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'options' => array(
PDO::ATTR_PERSISTENT => true,
),
),
/* other connections removed for brevity */
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment