PHP code example of deniztezcan / laravel-google-shopping

1. Go to this page and download the library: Download deniztezcan/laravel-google-shopping library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

deniztezcan / laravel-google-shopping example snippets


use DenizTezcan\LaravelGoogleShopping\LaravelGoogleShopping;

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

LaravelGoogleShopping::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 LaravelGoogleShopping::display();