Download the PHP package waltersilvacruz/laravel-meli without Composer

On this page you can find all versions of the php package waltersilvacruz/laravel-meli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-meli

MercadoLibre API Integration for Laravel

Integrate your Laravel Application with MercadoLibre's API.

Based on vcoud/mercadolibre (thank you, man!).

PHP client wrapper for MercadoLibre API.

This package was designed to work with Laravel, so it was written with Laravel in mind.

Installation

  1. Install with composer:

  2. Run the migration command to create the meli_app_tokens table:

The package uses the auto registration feature of Laravel.

Configuration

IMPORTANT: Before you start, check the following:

  1. Add the appropriate values to your

    example:

  2. Publish configs & views [optional]

    Config file

    A configuration file named can be published to by running the following command:

    Publishing Views

    View files can also be published by using:

    The blade's templates will be published into resources/views/vendor/meli folder, so you can customize the templates to apply your application's look and feel.

  3. Clear your route and config caches:

Usage

First, connect your Laravel Application into MercadoLibre via Oauth

You can connect to ML opening this link on browser: <your-app-site>/meli/connect/<state>. Here, the <state> parameter is mandatory!

This wrapper uses <state> as unique identifier for each authentication token, allowing your site to connect to multiples ML accounts.

Example:

Using methods to retrieve data from ML

Once connected, you can perform queries to ML's API using one of the following methods:

Sample code:

Every call returns an stdClass object:

Please refer to ML API docs to learn about all available endpoints and its response data.

Multiples Connections

Yes, we can! It is possible to connect to multiples ML accounts at same time.

Let's imagine the following scenario:

Make sure each user will have a UNIQUE state identification.

Each user will be prompted to log in via ML OAuth, then they must allow your application to connect into their accounts. The auth and refresh tokens for each state will be stored into meli_app_tokens table. The state column will be the key to fetch the correct token when instantiate the service.

Command line utility

This package comes with a utility command to help you create test users on MercadoLibre.

You can use one of the following options for the [site] parameter:

Example:

Automatic token refreshing

The auth token last for 6 hours after its creation. After this, the auth token expires and a new one will be automatically generated using the refresh token before sending you query.

The auth token refreshing is automatic and no user action is required.

In other hand, the refresh token will expire after 6 months and the user MUST log in again to grab a fresh new one.

Documentation & Important notes

The URIs are relative to https://api.mercadolibre.com
Don’t forget to check out the MercadoLibre developer site
Official Laravel documentation

All versions of laravel-meli with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package waltersilvacruz/laravel-meli contains the following files

Loading the files please wait ....