laravel-shopee maintained by daygarcia
Description
A laravel package to consume Shopee OpenAPI V2.0
Author
Last update
2022/01/10 14:10
(dev-main)
License
Downloads
194
Laravel Shopee
Requirements
PHP 8 and later
Installation & Usage
Composer
To install via composer:
composer require daygarcia/laravel-shopee
Setup
The Configuration constructor takes a single argument: an array containing all configuration needed to connect to Mercado Livre API:
<?php
// Still under development
The access_token returned last for 6 hours.
Getter and setter methods are available for the Configuration class. You can directly get and set pending insert
Alternatively, if you are managing your token by yourself, you dont need request a new token every single API call. You can just pass the token as a value in Configuration instance:
<?php
use Illuminate\Http\Request;
...
$config = new Configuration([
'access_token' => 'APP_USR-fafafafafafa...',
]);
Example
<?php
use LaravelShopee\Configuration;
...
public function index(Request $request)
{
}