Skip to content

Laravel UPCItem DB ​

Installation ​

Install the package by the following command,

sh
composer require infyomlabs/laravel-upcitemdb

Publish the config file ​

Run the following command to publish config file,

sh
php artisan vendor:publish --provider="InfyOm\UPCItemDB\UPCItemDBServiceProvider"

Add Facade ​

Add the Facade to your config/app.php into aliases section,

Usage ​

Lookup ​

For UPC Lookup, use the lookup method by calling,

sh
\UPCItemDB::lookup('4002293401102');

For Search API, you can use the search method,

sh
\UPCItemDB::search('iphone 6');

\UPCItemDB::search('iphone 6', [
    'brand' => 'apple'
]);