public function boot()
{
Carbon::macro('range', function ($start, $end) {
return new Collection(
new DatePeriod(
$start,
new DateInterval('P1D'),
$end->copy()->add(new DateInterval('P1D'))
)
);
});
}return Carbon::range($this->startDate, $this->endDate)->map(function($date) {
return $date;
});