src/Collector.php
protected function collectIdsFromField($item, $field)
    {
        $ids = Arr::get($item, $field, []);

        return is_object($ids) && method_exists($ids, 'toArray') ? $ids->toArray() : (array) $ids;
    }
protected function collectIdsFromField($item, $field)
    {
        $ids = Arr::get($item, $field, []);

        return is_object($ids) && method_exists($ids, 'toArray') ? $ids->toArray() : (array) $ids;
    }
protected function collectIdsFromField ( $ item , $ field ) { $ ids = Arr :: get ( $ item , $ field , [ ] ) ; return is_object ( $ ids ) && method_exists ( $ ids , 'toArray' ) ? $ ids -> toArray ( ) : ( array ) $ ids ; }
Collect ids from field of item

@param $item
@param string $field
@return array
Collect ids from field of item