src/Processors/DocumentsProcessor.php
protected function makeDocuments(array $matches, array $ids, $documents, $text)
    {
        foreach ($ids as $key => $id)
        {
            $document = $documents->find($id);

            $parsedDocument = '';

            if ( ! is_null($document))
            {
                $parsedDocument = $document->present()->preview;
            }

            $text = str_replace($matches[$key], $parsedDocument, $text);
        }

        return $text;
    }
protected function makeDocuments(array $matches, array $ids, $documents, $text)
    {
        foreach ($ids as $key => $id)
        {
            $document = $documents->find($id);

            $parsedDocument = '';

            if ( ! is_null($document))
            {
                $parsedDocument = $document->present()->preview;
            }

            $text = str_replace($matches[$key], $parsedDocument, $text);
        }

        return $text;
    }
protected function makeDocuments ( array $ matches , array $ ids , $ documents , $ text ) { foreach ( $ ids as $ key => $ id ) { $ document = $ documents -> find ( $ id ) ; $ parsedDocument = '' ; if ( ! is_null ( $ document ) ) { $ parsedDocument = $ document -> present ( ) -> preview ; } $ text = str_replace ( $ matches [ $ key ] , $ parsedDocument , $ text ) ; } return $ text ; }
Replaces the document tags with presenter renders

@param array $matches
@param array $ids
@param Collection|null $documents
@param string $text
@return string
Replaces the document tags with presenter renders