mirror of
https://github.com/wearepixel/laravel-google-shopping-feed.git
synced 2026-11-14 13:21:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9dcce39b9 | ||
|
|
a7e22e8fce | ||
|
|
5a1c822810 | ||
|
|
fb85d49e88 |
@@ -25,8 +25,8 @@ ## Example
|
||||
'id' => 'item_001',
|
||||
'title' => 'Blue Nikes',
|
||||
'link' => 'https://mystore.com/products/blue-nikes',
|
||||
'image_link' => 'https://mystore.com/images/blue-nikes-001.jpg',
|
||||
'price' => 29.99,
|
||||
'g:image_link' => 'https://mystore.com/images/blue-nikes-001.jpg',
|
||||
'g:price' => 29.99,
|
||||
]);
|
||||
|
||||
return $feed->generate();
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
"laravel",
|
||||
"google-shopping-feed"
|
||||
],
|
||||
"version": "1.1.1",
|
||||
"version": "4.0.0",
|
||||
"homepage": "https://github.com/wearepixel/laravel-google-shopping-feed",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"require": {
|
||||
"spatie/array-to-xml": "2.8.*|3.*.*",
|
||||
"illuminate/support": "8.*|9.*"
|
||||
"illuminate/support": "8.*|9.*|10.*|11.*"
|
||||
},
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ class LaravelGoogleShoppingFeed
|
||||
'id',
|
||||
'link',
|
||||
'title',
|
||||
'price',
|
||||
'image_link'
|
||||
'g:price',
|
||||
'g:image_link'
|
||||
];
|
||||
|
||||
public static function init($title = null, $description = null, $link = null)
|
||||
@@ -53,7 +53,7 @@ public function addItem(array $item): bool
|
||||
public function generate()
|
||||
{
|
||||
$this->xml = [
|
||||
'rss' => [
|
||||
'rss' => [
|
||||
'_attributes' => [
|
||||
'xmlns:g' => 'http://base.google.com/ns/1.0',
|
||||
'version' => '2.0',
|
||||
|
||||
Reference in New Issue
Block a user