$topshiriqnoma = $connection->table('topshiriqnoma')->select('created_at')->whereBetween('created_at',
[
Carbon::createFromFormat('Y-m-d', $start_time)->startOfDay()->toDateTimeString(),
Carbon::createFromFormat('Y-m-d', $end_time)->endOfDay()->toDateTimeString()
]
)->orderBy('created_at', 'ASC')->get()->groupBy(function ($query) {
return Carbon::parse($query->created_at)->format('Y-m-d');
});