Devise\Support\Installer\DatabaseCreator::connection PHP Method

connection() protected method

Creates a new connection for given driver and also constructs a generic dsn
protected connection ( string $driver, string $host, string $username, string $password ) : PDO
$driver string
$host string
$username string
$password string
return PDO
    protected function connection($driver, $host, $username, $password)
    {
        $connection = $this->findPdoConnection($driver, $host, $username, $password);
        $connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        return $connection;
    }