Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dragon-code/laravel-feeds",
"description": "Simple generation XML feeds",
"description": "Fast export of large datasets to feeds for marketplaces and services",
"license": "MIT",
"type": "library",
"authors": [
Expand Down
4 changes: 4 additions & 0 deletions docs/labels.list
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
Available for JSON feeds
</secondary-label>

<secondary-label id="format-jsonl" name="jsonl" color="tangerine">
Available for JSON Lines feeds
</secondary-label>

</labels>
2 changes: 1 addition & 1 deletion docs/laravel-feeds.tree
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<toc-element toc-title="License" topic="license.topic" />
</toc-element>
<toc-element topic="introduction.topic">
<toc-element topic="supported-formats.topic" />
<toc-element topic="installation.topic" />
<toc-element topic="create-feeds.topic" />
<toc-element topic="generation.topic">
</toc-element>
<toc-element topic="advanced-usage.topic" />
<toc-element topic="supported-formats.topic" />
</toc-element>
<toc-element toc-title="Receipts">
<toc-element topic="receipt-sitemap.topic" />
Expand Down
20 changes: 10 additions & 10 deletions docs/snippets/advanced-directive-array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<array_directive>

<user>
<name>Giles Graham</name>
<avatar>https://via.placeholder.com/640x480.png/0066dd?text=ullam</avatar>
<avatar>https://via.placeholder.com/640x480.png/0033ff?text=autem</avatar>
<images name="sit consequatur ipsa">https://via.placeholder.com/640x480.png/00ddaa?text=voluptatibus</images>
<images name="deserunt aspernatur veniam">https://via.placeholder.com/640x480.png/00cc55?text=in</images>
<name>Jaiden Gerhold</name>
<avatar>https://via.placeholder.com/640x480.png/0022dd?text=aut</avatar>
<avatar>https://via.placeholder.com/640x480.png/00ddff?text=quia</avatar>
<images name="dolorem deleniti adipisci">https://via.placeholder.com/640x480.png/004400?text=enim</images>
<images name="fugit adipisci consequatur">https://via.placeholder.com/640x480.png/0011ff?text=eveniet</images>
</user>
<user>
<name>Katelyn Harber</name>
<avatar>https://via.placeholder.com/640x480.png/0066dd?text=voluptatem</avatar>
<avatar>https://via.placeholder.com/640x480.png/004488?text=quaerat</avatar>
<images name="consequuntur voluptatem voluptatem">https://via.placeholder.com/640x480.png/006655?text=ipsam</images>
<images name="fugiat consectetur qui">https://via.placeholder.com/640x480.png/007788?text=nam</images>
<name>Darien Murazik</name>
<avatar>https://via.placeholder.com/640x480.png/007700?text=vel</avatar>
<avatar>https://via.placeholder.com/640x480.png/00ffcc?text=nulla</avatar>
<images name="labore aspernatur et">https://via.placeholder.com/640x480.png/0022aa?text=dolore</images>
<images name="consequatur ipsa nihil">https://via.placeholder.com/640x480.png/006611?text=dolorum</images>
</user>

</array_directive>
10 changes: 5 additions & 5 deletions docs/snippets/advanced-directive-attributes.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<attributes_directive>

<company since="2007"/>
<company since="1983"/>
<url>https://example.com</url>

<user>
<name>Melvina Beer</name>
<contact email="lchamplin@example.org" phone="555-000-1"/>
<name>Estell Reinger</name>
<contact email="dorothea02@example.com" phone="555-000-1"/>
</user>
<user>
<name>Vivienne Willms</name>
<contact email="raynor.bertram@example.com" phone="555-000-2"/>
<name>Mrs. Marilie O'Connell DDS</name>
<contact email="arno70@example.com" phone="555-000-2"/>
</user>

</attributes_directive>
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-cdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<cdata_directive>

<user>
<name><![CDATA[<h1>Elmo Hilpert</h1>]]></name>
<email>alex.mohr@example.net</email>
<name><![CDATA[<h1>Jay Willms MD</h1>]]></name>
<email>uerdman@example.net</email>
</user>
<user>
<name><![CDATA[<h1>Golden Sawayn</h1>]]></name>
<email>jamison.ritchie@example.net</email>
<name><![CDATA[<h1>Mrs. Fae Rice</h1>]]></name>
<email>kuhic.tristian@example.com</email>
</user>

</cdata_directive>
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-mixed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<mixed_directive>

<user>
<name>Dr. Hudson Waters</name>
<name>Heath Cummerata</name>
<some>
<first>Foo</first>
<second>macejkovic.lois@example.net</second>
<second>kasey.sawayn@example.org</second>
</some>
</user>
<user>
<name>Scarlett Walter</name>
<name>Dr. Levi Leannon</name>
<some>
<first>Foo</first>
<second>ahaag@example.org</second>
<second>melany.runolfsson@example.org</second>
</some>
</user>

Expand Down
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-value.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<value_directive>

<user>
<name>Eldon Lind IV</name>
<contact type="email">rlarkin@example.org</contact>
<name>Mr. Jo Emard DVM</name>
<contact type="email">carolina77@example.net</contact>
</user>
<user>
<name>Miss Marcia Ebert Jr.</name>
<contact type="email">mayert.zackary@example.net</contact>
<name>Nicola Moore</name>
<contact type="email">lkuhlman@example.com</contact>
</user>

</value_directive>
8 changes: 4 additions & 4 deletions docs/snippets/advanced-element-attribute.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<attribute>

<user created_at="2025-09-05T19:34:02+00:00">
<user created_at="2025-09-05T21:10:29+00:00">
<id>1</id>
<name>Dr. Rory Streich I</name>
<name>Candida West</name>
</user>
<user created_at="2025-09-05T19:34:02+00:00">
<user created_at="2025-09-05T21:10:29+00:00">
<id>2</id>
<name>Dr. Nikko Oberbrunner</name>
<name>Prof. Hilton Wuckert</name>
</user>

</attribute>
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-header-footer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<user>
<id>1</id>
<name>Ryann Effertz</name>
<name>Daija Powlowski</name>
</user>
<user>
<id>2</id>
<name>Emely Ziemann MD</name>
<name>Lisa Reichel</name>
</user>

</header_footer>
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-info-before-false.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<user>
<id>1</id>
<name>Suzanne Stehr</name>
<name>Tabitha Jakubowski</name>
</user>
<user>
<id>2</id>
<name>Buddy Cruickshank DDS</name>
<name>Dr. Rachel Goyette</name>
</user>

</info_method>
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<user>
<id>1</id>
<name>Dejuan Schoen DDS</name>
<name>Daija Wehner Jr.</name>
</user>
<user>
<id>2</id>
<name>Miss Delilah Hartmann</name>
<name>Rosella Emard DDS</name>
</user>

</info_method>
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-root.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<user>
<id>1</id>
<name>Neal Rosenbaum</name>
<name>Baby McDermott DDS</name>
</user>
<user>
<id>2</id>
<name>Maryse Terry</name>
<name>Rachael Jerde</name>
</user>

</foo>
48 changes: 24 additions & 24 deletions docs/snippets/receipt-instagram-feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,46 @@

<item>
<g:id>1</g:id>
<g:title><![CDATA[exercitationem ut deserunt omnis]]></g:title>
<g:description><![CDATA[Est quis repellendus ex explicabo est nesciunt porro. Ea soluta odit recusandae dolorem. Voluptatem sint vel quo id quisquam nesciunt consequatur. Enim ipsum sit autem corrupti.]]></g:description>
<g:link>https://example.com/products/aut-dolor-et-consequuntur-possimus-eos</g:link>
<g:image_link>https://via.placeholder.com/640x480.png/002222?text=et</g:image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/006677?text=maxime</g:additional_image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/008866?text=recusandae</g:additional_image_link>
<g:brand>sapiente</g:brand>
<g:title><![CDATA[aut nisi officia ut]]></g:title>
<g:description><![CDATA[Molestias et et et et voluptatem. Quisquam occaecati nostrum libero. Qui et tenetur fugiat et sint.]]></g:description>
<g:link>https://example.com/products/illo-fugiat-in-voluptatem-sunt</g:link>
<g:image_link>https://via.placeholder.com/640x480.png/00ff55?text=debitis</g:image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/001111?text=sequi</g:additional_image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/00dd22?text=et</g:additional_image_link>
<g:brand>cupiditate</g:brand>
<g:condition>new</g:condition>
<g:availability>in stock</g:availability>
<g:price>799</g:price>
<g:sale_price>799</g:sale_price>
<g:price>348</g:price>
<g:sale_price>348</g:sale_price>
<g:item_group_id>12345</g:item_group_id>
<g:status>active</g:status>
<g:color><![CDATA[MistyRose]]></g:color>
<g:size>38</g:size>
<g:color><![CDATA[Green]]></g:color>
<g:size>45</g:size>
<g:age_group>adult</g:age_group>
<g:material><![CDATA[saepe]]></g:material>
<g:material><![CDATA[non]]></g:material>
<g:pattern><![CDATA[regular]]></g:pattern>
<g:google_product_category>1000</g:google_product_category>
<g:fb_product_category>2000</g:fb_product_category>
</item>
<item>
<g:id>2</g:id>
<g:title><![CDATA[quos suscipit quidem et]]></g:title>
<g:description><![CDATA[Dolorem id alias est reprehenderit magnam. Tempore sapiente ea quo odio doloribus enim consequatur. Voluptatem ea accusantium dolorem consequatur deleniti et aperiam. Necessitatibus aut non non sit.]]></g:description>
<g:link>https://example.com/products/illum-occaecati-corrupti-voluptate</g:link>
<g:image_link>https://via.placeholder.com/640x480.png/0055cc?text=sunt</g:image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/0099cc?text=sint</g:additional_image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/00ccff?text=sequi</g:additional_image_link>
<g:brand>nostrum</g:brand>
<g:title><![CDATA[eos sunt dolores nobis]]></g:title>
<g:description><![CDATA[Qui culpa voluptatum ab facere dicta quo. Corporis asperiores dolor inventore omnis provident quod dolor. Eius magnam delectus placeat eaque. Qui sit sed nemo et.]]></g:description>
<g:link>https://example.com/products/laboriosam-hic-facilis-earum-voluptatem-sint-sit</g:link>
<g:image_link>https://via.placeholder.com/640x480.png/00bb77?text=autem</g:image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/00aa33?text=est</g:additional_image_link>
<g:additional_image_link>https://via.placeholder.com/640x480.png/002266?text=et</g:additional_image_link>
<g:brand>expedita</g:brand>
<g:condition>new</g:condition>
<g:availability>in stock</g:availability>
<g:price>228</g:price>
<g:sale_price>228</g:sale_price>
<g:price>331</g:price>
<g:sale_price>331</g:sale_price>
<g:item_group_id>12345</g:item_group_id>
<g:status>active</g:status>
<g:color><![CDATA[LightYellow]]></g:color>
<g:size>11</g:size>
<g:color><![CDATA[LawnGreen]]></g:color>
<g:size>46</g:size>
<g:age_group>adult</g:age_group>
<g:material><![CDATA[qui]]></g:material>
<g:material><![CDATA[id]]></g:material>
<g:pattern><![CDATA[regular]]></g:pattern>
<g:google_product_category>1000</g:google_product_category>
<g:fb_product_category>2000</g:fb_product_category>
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/receipt-sitemap-feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">

<url>
<loc>https://example.com/products/aperiam-voluptatem-atque-quia-et</loc>
<loc>https://example.com/products/sunt-aut-eum-hic-enim-veritatis-libero</loc>
<lastmod>2025-09-04T04:08:12+00:00</lastmod>
<priority>0.9</priority>
</url>
<url>
<loc>https://example.com/products/eligendi-aperiam-est-fugiat-nobis-consequatur-harum-nihil</loc>
<loc>https://example.com/products/rerum-est-ipsum-est-et-alias-commodi-neque-quod</loc>
<lastmod>2025-09-04T04:08:12+00:00</lastmod>
<priority>0.9</priority>
</url>
Expand Down
48 changes: 24 additions & 24 deletions docs/snippets/receipt-yandex-feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@
<offers>

<offer id="1" available="true" type="vendor.model">
<url>https://example.com/products/velit-rerum-et-omnis-provident-rerum-inventore-est</url>
<barcode>GD-N~_Z(N</barcode>
<name>et et eligendi aliquam</name>
<description>Itaque esse qui tempora non. Illum et quia cum ea quo est. Sit animi et voluptate voluptatem voluptates animi. At illum asperiores vero animi.</description>
<url>https://example.com/products/fugiat-aut-sequi-minima-quia-facere</url>
<barcode>GD-O)N-&gt;X</barcode>
<name>adipisci quis asperiores rem</name>
<description>Cumque necessitatibus quia minima aspernatur et dolor quae. Dignissimos maxime aut rerum velit perspiciatis. Beatae sit a quisquam atque.</description>
<delivery>true</delivery>
<price>957</price>
<price>456</price>
<currencyId>RUR</currencyId>
<vendor>porro</vendor>
<picture>https://via.placeholder.com/640x480.png/00bbcc?text=possimus</picture>
<picture>https://via.placeholder.com/640x480.png/00ffdd?text=qui</picture>
<picture>https://via.placeholder.com/640x480.png/005511?text=ullam</picture>
<param name="Артикул">GD-N~_Z(N</param>
<param name="Код цвета">6</param>
<param name="Пол">male</param>
<vendor>eos</vendor>
<picture>https://via.placeholder.com/640x480.png/00ff77?text=facere</picture>
<picture>https://via.placeholder.com/640x480.png/006622?text=illo</picture>
<picture>https://via.placeholder.com/640x480.png/00cc77?text=magni</picture>
<param name="Артикул">GD-O)N-&gt;X</param>
<param name="Код цвета">2</param>
<param name="Пол">female</param>
</offer>
<offer id="2" available="true" type="vendor.model">
<url>https://example.com/products/deserunt-odio-earum-neque-ipsum-alias-magni</url>
<barcode>GD-'B'"SS</barcode>
<name>est veritatis officiis quae</name>
<description>Et velit libero dolorem sed est. Repellendus commodi tempore reiciendis quo. Cupiditate reprehenderit dolor molestiae nulla voluptas. Dolorem alias a architecto est quas dolore quas iste.</description>
<url>https://example.com/products/earum-voluptatem-magnam-error-molestiae-odit-consectetur</url>
<barcode>GD-+5T19</barcode>
<name>alias veritatis dignissimos omnis</name>
<description>Sint qui voluptatem quos et. Sint natus beatae ipsum maiores ipsa quas.</description>
<delivery>true</delivery>
<price>844</price>
<price>553</price>
<currencyId>RUR</currencyId>
<vendor>doloribus</vendor>
<picture>https://via.placeholder.com/640x480.png/0099ee?text=quo</picture>
<picture>https://via.placeholder.com/640x480.png/0044ee?text=expedita</picture>
<picture>https://via.placeholder.com/640x480.png/007777?text=fugiat</picture>
<param name="Артикул">GD-'B'"SS</param>
<param name="Код цвета">5</param>
<param name="Пол">female</param>
<vendor>consequatur</vendor>
<picture>https://via.placeholder.com/640x480.png/00bb99?text=voluptas</picture>
<picture>https://via.placeholder.com/640x480.png/00bb22?text=recusandae</picture>
<picture>https://via.placeholder.com/640x480.png/0088ee?text=fugit</picture>
<param name="Артикул">GD-+5T19</param>
<param name="Код цвета">9</param>
<param name="Пол">male</param>
</offer>

</offers>
Expand Down
1 change: 1 addition & 0 deletions docs/topics/advanced-usage.topic
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<chapter title="Information" id="information">
<secondary-label ref="format-xml" />
<secondary-label ref="format-json" />
<secondary-label ref="format-jsonl" />

<p>
To add information to the beginning of the root element (if present) or without it,
Expand Down
5 changes: 0 additions & 5 deletions docs/topics/create-feeds.topic
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@
</chapter>

<chapter title="File format" id="file_format">
<note title="Supported formats">
<include from="supported-formats.topic" element-id="formats" />
</note>

<p>
You can generate feeds in different formats.
A feed class can be correctly exported only to the format for which it is intended.
Expand All @@ -117,7 +113,6 @@
</p>

<code-block lang="php" src="create-feeds-feed-format.php" include-lines="5-" />

</chapter>

</topic>
Loading