title: How to correctly apply php PDO to Laravel
body: <p>As the search result of mine, Laravel uses PDO to process database queries by default, and there is no need to escape any queries as what <code>mysql_real_escape_string()</code> does when using PDO.<br>
  <code>mysql_real_escape_string()</code> converts <code>\r</code> to <code>\\r</code>, and this is what I need because I don't want a carriage return character appears in username.<br>
  But, when I try this:  </p>
  
  <pre><code>$name="\r\r\r\r\r\r\r\r\r";
  $user = User::where("username","=",$input)-&gt;first();
  $user-&gt;name=$name;
  $user-&gt;save();
  echo "&lt;p&gt;".$user["name"]."&lt;/p&gt;";
  </code></pre>
  
  <p>The output html code is like this:</p>
  
  <pre><code>&lt;p&gt;
  
  
  
  
  
  
  
  
  &lt;/p&gt;  
  </code></pre>
  
  <p>Does PDO use another method to handle <code>\r</code>?<br>
  Or Laravel isn't using PDO to handle this query?<br>
  What's the best way I can do to achieve my need?</p>