Pluck datefields

thanks a lot, this is not working,
I think the returned value of ->pluck('startdate') is a string?!

But I made it with substr():

$years = array_unique(array_map(function($item) {
  return substr($item, 0, 4);
}, $years));