title: MySQL YEAR() equivalent in Laravel query builder
body: <p>With MySQL, I can use the <a href="https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_year" rel="noreferrer"><code>YEAR()</code></a> function like this to filter by the year of a date field in a <code>WHERE</code> clause:</p>
  
  <pre><code>SELECT noworkorder FROM workorders WHERE YEAR(date)=2015;
  </code></pre>
  
  <p>In Laravel, I can of course achieve the same thing with a <a href="http://laravel.com/docs/5.1/queries#selects" rel="noreferrer">raw expression</a>:</p>
  
  <pre><code>$data = DB::table('workorders')
         -&gt;select('noworkorder')
         -&gt;where(DB::raw('YEAR(date)=2015'))
         -&gt;orderby('noworkorder', 'desc')
         -&gt;get();
  </code></pre>
  
  <p>But is there a way to do this without raw expressions?</p>