source/Spiral/ORM/Entities/RecordIterator.php
public function getIterator(): \Generator
    {
        foreach ($this->data as $index => $data) {
            if (isset($data[ORMInterface::PIVOT_DATA])) {
                /*
                 * When pivot data is provided we are able to use it as array key.
                 */
                $index = $data[ORMInterface::PIVOT_DATA];
                unset($data[ORMInterface::PIVOT_DATA]);
            }

            yield $index => $this->orm->make(
                $this->class,
                $data,
                ORMInterface::STATE_LOADED,
                true
            );
        }
    }
public function getIterator(): \Generator
    {
        foreach ($this->data as $index => $data) {
            if (isset($data[ORMInterface::PIVOT_DATA])) {
                /*
                 * When pivot data is provided we are able to use it as array key.
                 */
                $index = $data[ORMInterface::PIVOT_DATA];
                unset($data[ORMInterface::PIVOT_DATA]);
            }

            yield $index => $this->orm->make(
                $this->class,
                $data,
                ORMInterface::STATE_LOADED,
                true
            );
        }
    }
public function getIterator ( ) : \ Generator { foreach ( $ this -> data as $ index => $ data ) { if ( isset ( $ data [ ORMInterface :: PIVOT_DATA ] ) ) { /*
                 * When pivot data is provided we are able to use it as array key.
                 */ $ index = $ data [ ORMInterface :: PIVOT_DATA ] ; unset ( $ data [ ORMInterface :: PIVOT_DATA ] ) ; } yield $ index => $ this -> orm -> make ( $ this -> class , $ data , ORMInterface :: STATE_LOADED , true ) ; } }
Generate over data.
Method will use pibot

@return \Generator
Generate over data . Method will use pibot