title: How to use SQL Server connection in Laravel?
body: <p>I got a working project made in Laravel 3 that I have to switch to MsSQL Server (not my call though, sniff...) and I don't understand the Laravel configuration on this database type...</p>
  
  <p>I changed the default inside <code>database.php</code> to this <code>'default' =&gt; 'sqlsrv'</code> then I configured the host, database, username, password in the <code>sqlsrv</code> array but then I get this error message: </p>
  
  <blockquote>
    <p>This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server`</p>
  </blockquote>
  
  <p>After some research I found that we need PDO of SQLSRV, which I already have as version 5.4 and in my <code>phpinfo</code> I get this returned <code>pdo_sqlsrv support : enabled</code> so it seems all correct but at the same time it seems to ask for ODBC SQLSRV connections, does I really have to use that? </p>
  
  <p>I would rather connect directly from the Laravel database connection... but even if I need it and I created some ODBC connection to the server, how do I put them inside my configuration? Here is what I have in my configuration (of course the <code>my...</code> is replace by my real details) :</p>
  
  <pre class="lang-php prettyprint-override"><code>'sqlsrv' =&gt; array(
      'driver'   =&gt; 'sqlsrv',
      'host'     =&gt; 'myServerIP', 
      'database' =&gt; 'myDatabase',
      'username' =&gt; 'myUsername',
      'password' =&gt; 'myPassword',
      'prefix'   =&gt; '',
   ),
  </code></pre>
  
  <p>Any help would be greatly appreciated, the only thing I found close to my problem was this link from the Laravel forum: <a href="http://forums.laravel.io/viewtopic.php?pid=50680">Laravel query on SQL Server</a> but then it just stop without giving any configurations.</p>