title: Date format Query in Laravel
body: <p>My query for fetching a data from database is,</p>
  
  <pre><code>select mailboxtoolno,DATE_FORMAT(maileventdate,'%d %b %Y') as 
  date,DATE_FORMAT(maileventdate,'%H:%i:%s') as time,mailtype from 
  domiciliation_mailbox where reg_id =".$regid." order by id DESC
  </code></pre>
  
  <p>How can i change it to laravel eloquent model,</p>
  
  <p>I have been trying to change it like,</p>
  
  <pre><code> $timeline= mailbox::select('mailboxtoolno','DATE_FORMAT(maileventdate,"%d %b %Y") as date','DATE_FORMAT(maileventdate,"%H:%i:%s") as time','mailtype')
  -&gt;where('reg_id', '=',$reg_id )
  -&gt;paginate(10);
  </code></pre>
  
  <p>But got an error like,</p>
  
  <pre><code>Unknown column 'DATE_FORMAT(maileventdate,"%d %b %Y")' in 'field list'
  </code></pre>
  
  <p>How can i get the correct value in date format in laravel</p>