source/Spiral/ORM/Entities/Relations/ManyToManyRelation.php
private function assertPivot(array $pivotData)
    {
        if ($diff = array_diff(array_keys($pivotData), $this->schema[Record::PIVOT_COLUMNS])) {
            throw new RelationException(
                "Invalid pivot data, undefined columns found: " . join(', ', $diff)
            );
        }
    }
private function assertPivot(array $pivotData)
    {
        if ($diff = array_diff(array_keys($pivotData), $this->schema[Record::PIVOT_COLUMNS])) {
            throw new RelationException(
                "Invalid pivot data, undefined columns found: " . join(', ', $diff)
            );
        }
    }
private function assertPivot ( array $ pivotData ) { if ( $ diff = array_diff ( array_keys ( $ pivotData ) , $ this -> schema [ Record :: PIVOT_COLUMNS ] ) ) { throw new RelationException ( "Invalid pivot data, undefined columns found: " . join ( ', ' , $ diff ) ) ; } }
Make sure that pivot data in a valid format.

@param array $pivotData

@throws RelationException
Make sure that pivot data in a valid format .