diff --git a/composer.json b/composer.json index f3343bd..58ee4d4 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,31 @@ -{ - "name": "abram/laravel-odbc", - "description": "ODBC integration for Laravel framework ", - "type": "library", - "homepage": "https://github.com/andreossido/laravel-odbc", - "authors": [ - { - "name": "Andrea Abram", - "email": "andreossido@gmail.com", - "homepage": "https://github.com/andreossido", - "role": "Developer" - } - ], - "require": { - "php": "^5.3.3 || >=7.0", - "illuminate/database": "~5.1", - "illuminate/support": "~5.1" - }, - "autoload": { - "classmap": [ - "src" - ] - } -} +{ + "name": "abram/laravel-odbc", + "description": "ODBC integration for Laravel framework ", + "type": "library", + "homepage": "https://github.com/andreossido/laravel-odbc", + "authors": [ + { + "name": "Andrea Abram", + "email": "andreossido@gmail.com", + "homepage": "https://github.com/andreossido", + "role": "Developer" + } + ], + "require": { + "php": "^5.3.3 || >=7.0", + "illuminate/database": "~5.1 || >= 6.0", + "illuminate/support": "~5.1 || >= 6.0" + }, + "autoload": { + "classmap": [ + "src" + ] + }, + "extra": { + "laravel": { + "providers": [ + "Abram\\Odbc\\ODBCServiceProvider" + ] + } + } +} diff --git a/src/ODBCConnector.php b/src/ODBCConnector.php index 06ee076..ce37e6a 100644 --- a/src/ODBCConnector.php +++ b/src/ODBCConnector.php @@ -1,50 +1,51 @@ -getOptions($config); - - $dsn = array_get($config, 'dsn'); - - $connection = $this->createConnection($dsn, $config, $options); - - return $connection; - } - - /** - * Create a new PDO connection instance. - * - * @param string $dsn - * @param string $username - * @param string $password - * @param array $options - * @return ODBCPdo - */ - protected function createPdoConnection($dsn, $username, $password, $options) - { - return new ODBCPdo($dsn, $username, $password); - } -} \ No newline at end of file +getOptions($config); + + $dsn = Arr::get($config, 'dsn'); + + $connection = $this->createConnection($dsn, $config, $options); + + return $connection; + } + + /** + * Create a new PDO connection instance. + * + * @param string $dsn + * @param string $username + * @param string $password + * @param array $options + * @return ODBCPdo + */ + protected function createPdoConnection($dsn, $username, $password, $options) + { + return new ODBCPdo($dsn, $username, $password); + } +}