jeudi 1 septembre 2016

Connect SQL Server with PHP: Laravel 5.3

Inside config\database.php below setting is changed from mysql to sqlsrv

'default' => env('DB_CONNECTION', 'sqlsrv'),

In connection list added the below code.

'sqlsrv' => [
    'driver' => 'sqlsrv',
    'host' => 'Pankaj\SQLEXPRESS', 
    'database' => '',
    'username' => 'sa',
    'password' => 'pankaj',
    'prefix' => '',
]

Inside .env file below are the modifications for Sql Server

DB_CONNECTION=sqlsrv
DB_HOST=Pankaj\SQLEXPRESS

DB_DATABASE=Pankaj
DB_USERNAME=sa
DB_PASSWORD=pankaj

Error Details

PDOException in Connector.php line 119: could not find driver



via Chebli Mohamed

1 commentaire:

Unknown a dit…

Did you find the solution?

Enregistrer un commentaire