This package provides a convenient wrapper to the Open Food Facts API for Laravel applications (5.7+).
Abandoned. Do not use this repo anymore
>>> NEW LOCATION: openfoodfacts/openfoodfacts-laravel <<<
You can install the package via composer:
composer require palmans/laravel-openfoodfacts
OpenFoodFacts::barcode('20203467');
it returns an array with product details:
Array
(
[product_name] => Cantuccini with hazelnuts
[image_url] => https://static.openfoodfacts.org/images/products/20203467/front_fr.4.400.jpg
...
)
$collection = OpenFoodFacts::find('Coca Cola Zero');
//returns a Illuminate\Support\Collection of arrays with details of each product found
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.