ray-nl/laravel-facebook-catalog

Laravel Facebook Catalog package

v1.0.3 2022-07-07 12:26 UTC

This package is not auto-updated.

Last update: 2024-11-14 03:55:50 UTC


README

This package is a fork of https://github.com/deniztezcan/laravel-google-shopping and adapted to the Facebook Catalog format.

Installation

composer require ray-nl/laravel-facebook-catalog

Example

use RayNl\LaravelFacebookCatalog\LaravelFacebookCatalog;

LaravelFacebookCatalog::setTitle('Example feed');
LaravelFacebookCatalog::setDescription('Example feed of the Example shop');
LaravelFacebookCatalog::setLink('https://example.shop');

LaravelFacebookCatalog::addItem(
	"https://example.shop/p/foo-bar",
	"SKU123",
	"Foo bar",
	"https://example.shop/images/foo-bar.png",
	"Foo bar best product",
	'new',
	99.99,
	'Foo brand',
	'6387712293758',
	[
		'country' => 'NL',
		'service' => 'PostNL - Gratis',
		'price'	  => 0
	]
);

return LaravelFacebookCatalog::display();