ODBC Driver for Laravel v6.0+
- The composer.json file use the "auto discover" function so you must have laravel ^6.0
- You must create a ODBC in your operating system
composer require kanebridge/laravel-odbc-driver
composer update
'odbc' => [
'driver' => 'odbc',
'dsn' => 'dns name',
'grammar' => 'SqlServerGrammar',
'username' => 'username',
'password' => 'password',
'database' => 'database'
],
@php
$array = DB::connection('odbc')->select('raw sql query');
dd($array);
@endphp
- Adrian Gomez @ https://github.com/AdrianGomezCL/laravel-odbc-driver