title: Laravel PDO Settings?
body: <p>I would like to return INT as integers from my database. At the moment all values are loaded as Strings. Database is MSSQL 2012 and I use the PDO driver (for v5.6).</p>
  
  <p>Trying to set the properties here (as shown <a href="http://fideloper.com/laravel-pdo-connection-options" rel="noreferrer">here on fideloper.com</a>, but I don't know if that's still possible):</p>
  
  <pre><code>   'sqlsrv' =&gt; [
          'driver'   =&gt; 'sqlsrv',
          'charset'  =&gt; 'utf8',
          'prefix'   =&gt; '',
           ......
          'options'   =&gt; array(
              PDO::ATTR_STRINGIFY_FETCHES =&gt; false,
              PDO::ATTR_EMULATE_PREPARES =&gt; false,
          ),
      ],
  </code></pre>
  
  <p>But always getting an error:</p>
  
  <pre><code>SQLSTATE[IMSSP]: The given attribute is only supported on the PDOStatement object.
  </code></pre>
  
  <p>How can I set any settings for the PDO Driver to return INT as Integers and not as Strings.</p>
  
  <p>This is still not working:</p>
  
  <pre><code> $pdo = DB::connection()-&gt;getPdo();
   $pdo-&gt;setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
   $pdo-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
   .. do ORM Query
  </code></pre>
  
  <p>Bringing the same error.</p>
  
  <p>Maybe anyone can help me?</p>