PHP 8 and later
To install via composer:
composer require daygarcia/laravel-shopee
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...',
]);
<?php
use LaravelShopee\Configuration;
...
public function index(Request $request)
{
}