Filter records according to year using Laravel Eloquent ORM

I've been thinking to make my first blog long time ago but I have no idea on the topic that I'm interested.  Since my obsession with Laravel began when it was released in May of 2013 I realized this is the right time to gain knowledge and experience using the framework. I've been reading and watching tutorials on how to do things with Laravel and It's been fun so far.  With the knowledge I've got I want to test some basics of the framework. I decided to go to Laravel Forum and see if I could answer some of the questions that others may have regarding the framework and one of the question was How to Filter Records according to Year.  I guess this one is pretty basic but very useful for most of the situations specially blogs.  So I created a Route below to solve the problem:

Route::get('/year',function()
{
   $year= '2013';
    return Post::whereRaw('YEAR(`posted_date`) = ?', array($year))->get();
});

Change the variable $year according to your needs. Then go to your URL http://yourdomain/year