title: How to perform TRIM() and CONCAT() in Laravel Query Builder?
body: <p>I tried to take FirstName, middlename, Lastname used the Query Builder in combination with RAW but failed. is my way wrong? Thanks</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$student = \DB::table('student')
                          -&gt;select(DB::raw('RTRIM(LTRIM(CONCAT(
                                            COALESCE(FirstName +  ''),
                                          COALESCE(MiddleName +  ''),
                                          COALESCE(Lastname, ''))))
                                          AS Name'))
                          -&gt;get();</code></pre>
  </div>
  </div>
  </p>