rui_mashita / laravel-dblib-odbc-sqlserver
PDO DBLIB or PDO ODBC SQL Server Driver for Laravel 4
Installs: 1 648
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 6
Open Issues: 0
Requires
- php: >=5.3.0
- illuminate/database: ~4.2
- illuminate/support: ~4.2
This package is not auto-updated.
Last update: 2024-11-23 18:01:53 UTC
README
Requirements
- PHP 5.3+
- Laravel 4.2.*
Installation
Add rui_mashita/laravel-dblib-odbc-sqlserver
as a requirement to composer.json:
{ "require": { "rui_mashita/laravel-dblib-odbc-sqlserver": "dev-master" } }
service provider registration in you app.php
file under app\config
path from Laravel project root folder.
'DblibOdbcSqlServer\Database\ServiceProvider',
Configuration
Finally be sure to add the odbc driver with connection information to the config/database.php
file like so:
'connections' => array( // .. Existing config here .. // ODBC config example 'odbc' => array( 'driver' => 'odbc', 'dsn' => 'Driver={ODBC Driver};', 'username' => 'foo', 'password' => 'bar', 'database' => '', ), // DBLIB config example 'dblib' => array( 'driver' => 'dblib', 'host' => '172.16.0.223', 'port' => '1433', 'username' => 'sa', 'password' => 'password', 'database' => 'testtest', ), ),