I have a problem in a query I'am making in Laravel.
My query looks like this:
<!-- Select all event in this year -->
$thisYear = test::where('id', '=', $id)
->where('YEAR(start)', '=', date("Y"));
<!-- Group all events by year -->
$years = test::where('id', '=', $id)
->groupBy('YEAR(start)');
In the first code I would like to get all the events that there is in this year (2013)
In the second I would like to group all events in Years.
Hopes somebody can help.
Regards, Andreas