whereIn('deviceId', $deviceIds) ->group('deviceId') ->select() ->toArray(); } }