title: Laravel Eloquent REPLACE
body: <p>I'm creating a database migration script in a Laravel 4 command.</p>
  
  <p>All the database migration process is fine but I'm having trouble changing user prefixes: I need to change USER-JOHN-JB TO USER-JOHN-OD, all the user suffixes need to be changes from '-JB' to '-OD'.</p>
  
  <p>The current line of code I have is:</p>
  
  <pre><code>DB::table('users')-&gt;update(['username' =&gt; DB::raw("REPLACE(username, '-".$suffix."', '-".$thisSuffix."')")]);
  </code></pre>
  
  <p>If I run this code in the REPL it works fine however it doesn't work in the command.</p>
  
  <p>Looking at the logs the generated SQL query is:</p>
  
  <pre><code>update `users` set `username` = REPLACE(username, "-JB
  ", "-OD")
  </code></pre>
  
  <p>For some reason a line break is being inserted into the query. I'm not sure if that has anything to do with the problem.</p>
  
  <p>Does anybody know how to fix this?
  Any help is much appreciated.</p>
  
  <p>Thanks in advance.</p>