src/Collector.php
public function scanCollection($collection, $fields)
    {
        $fields = (array) $fields;
        foreach ($collection as $item) {
            $this->collectIdsFromItem($item, $fields);
        }

        return $this;
    }
public function scanCollection($collection, $fields)
    {
        $fields = (array) $fields;
        foreach ($collection as $item) {
            $this->collectIdsFromItem($item, $fields);
        }

        return $this;
    }
public function scanCollection ( $ collection , $ fields ) { $ fields = ( array ) $ fields ; foreach ( $ collection as $ item ) { $ this -> collectIdsFromItem ( $ item , $ fields ) ; } return $ this ; }
Add a collection source.

@param $collection
@param mixed $fields
@return $this
Add a collection source .