You have a collection rather than a Builder instance; there is no whereBetween method available on Collection. You can chain two where methods:
$logquery->where('timestamp', '>=', $to)->where('timestamp', '<', $now);
or you can use a filter
$logquery->filter(function ($log) {
return $log->timestamp '>= $to && $log->timestamp < $now;
});