whereIn('status', $statuses) ->whereBetween('created_at', [$start . ' 00:00:00', $end . ' 23:59:59']) ->get(); } public function getPurchaseOrdersByIds(array $ids, array $with = []): Collection { return PurchaseOrder::whereIn('id', $ids)->with($with)->get(); } }