P粉6004020852023-09-01 10:40:21
The problem with the above query is that it looks like this
InboundMessage::query()->->whereIn('short_code', ["9999"])..
Since you used ->
in both the query builder and the $query string. So just adjust your $query to
$query = 'whereIn('short_code', ["9999"])->whereBetween('request_timestamp', [request('startTime'), request('endTime')])';