title: Using DB::raw in POST request
body: <p>So I have a query that is selecting a table. That is all. This query runs in an AJAX POST request in one of my controllers. Here's the query:</p>
  
  <pre><code>$myTable = \DB::table('signature')
      -&gt;where('email_list', 'LIKE', '%'.$request['email'].'%')
      -&gt;select([
          'signature',
          'version',
          'type',
          DB::raw("CONCAT(signature.size,'',signature.size_unit) AS sizea")
      ])
      -&gt;get();
  echo json_encode($myTable, JSON_PRETTY_PRINT);
  </code></pre>
  
  <p>Whenever I make the POST request, I get a error 500 Internal Server Error. If I remove/comment out the <code>DB::raw("CONCAT(signature.size,'',signature.size_unit) AS sizea")</code> part, the POST request goes through and everything is fine. </p>
  
  <p>So there's probably something wrong with the <code>DB::raw</code> part, right? You'd think so, but if I use this query on the page I'm executing it on and <code>var_dump</code> it, the statement works, even with the <code>DB::raw</code> part.</p>
  
  <p>Can anyone shed some light on what's going on?</p>
  
  <p>EDIT: Error logs from Console:</p>
  
  <pre><code>POST                                                 jquery.min.js:4  
  http://xxx.xx.xx.xxx:8000/lab/misc/signature/get_list 500 (Internal Server Error)
      send @ jquery.min.js:4
      ajax @ jquery.min.js:4
      (anonymous function) @ signature_hunter:345
      dispatch @ jquery.min.js:3
      q.handle @ jquery.min.js:3
      ListPicker._handleMouseUp @ about:blank:542
  </code></pre>