$byweek = Reservation::all()->groupBy(function($date) { return Carbon::parse($date->check_in)->format('W'); }); $byweek = $byweek->reverse();