I have the following query params in string format
$query = '->whereIn('short_code', ["9999"])->whereBetween('request_timestamp', [request('startTime'), request('endTime')])';
How do i pass it to the eloquent? Am trying to achieve something like this
InboundMessage::query()->{$query};
Am getting the error below
Property [->whereIn('short_code', ["9999"])->whereBetween('request_timestamp', [request('startTime'), request('endTime')])] does not exist on the Eloquent builder instance.