Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
donmbelembe committed Jan 14, 2023
1 parent 2564619 commit a0373d2
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,25 @@ composer require donmbelembe/laravel-facebook-catalog
## Usage

```php
$laravelFacebookCatalog = new Donmbelembe\LaravelFacebookCatalog();
echo $laravelFacebookCatalog->echoPhrase('Hello, Donmbelembe!');
use Donmbelembe\LaravelFacebookCatalog\LaravelFacebookCatalog;

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

LaravelFacebookCatalog::addItem([
'link' => 'https://example.shop/p/foo-bar',
'id' => 'SKU123',
'title' => 'Foo bar',
'image_link' => 'https://example.shop/images/foo-bar.png',
'description' => 'Foo bar best product',
'availability' => 'new',
// "price" => 99.99,
'brand' => 'Foo brand',
'condition' => 'new',
]);

return LaravelFacebookCatalog::display();
```

An example of the expected array
Expand Down

0 comments on commit a0373d2

Please sign in to comment.