public function embedsMany($parent, string $relatedClass, string $relation = null): EmbedsMany
    {
        if (is_null($relation)) {
            list(, $caller) = debug_backtrace(false);
            $relation = $caller['function'];
        }

        $this->addEmbeddedRelation($relation);
        $this->addNonProxyRelation($relation);

        return new EmbedsMany($parent, $relatedClass, $relation);
    }
public function embedsMany($parent, string $relatedClass, string $relation = null): EmbedsMany
    {
        if (is_null($relation)) {
            list(, $caller) = debug_backtrace(false);
            $relation = $caller['function'];
        }

        $this->addEmbeddedRelation($relation);
        $this->addNonProxyRelation($relation);

        return new EmbedsMany($parent, $relatedClass, $relation);
    }
public function embedsMany ( $ parent , string $ relatedClass , string $ relation = null ) : EmbedsMany { if ( is_null ( $ relation ) ) { list ( , $ caller ) = debug_backtrace ( false ) ; $ relation = $ caller [ 'function' ] ; } $ this -> addEmbeddedRelation ( $ relation ) ; $ this -> addNonProxyRelation ( $ relation ) ; return new EmbedsMany ( $ parent , $ relatedClass , $ relation ) ; }
Define an Embedded Collection.

@param mixed  $parent
@param string $relatedClass
@param string $relation

@return EmbedsMany
Define an Embedded Collection .