I'm running this query filtering relation entries. It's working good.
$places = Place::
with([
'mytickets' => function($q) use ($from, $to) {
$q->whereBetween('used_at', [$from, $to]);
}])
->get();
So now I want to get results sorting DESC by the count of mytickets.
Is it possible?