I have this code to get events which is in current year:
$year = "YEAR('".date('Y/m/d')."')";
$event = Event::where('date_start', $year);
var_dump($event->toSql());
But the query representation of the code is as follows:
"select * from `events` where `date_start` = ? and `events`.`deleted_at` is null"
Why is that? Where my mistake?