quentinbontemps/laravel-mondialrelay

Client Laravel pour l'API Mondial Relay

1.0.7 2019-04-15 07:09 UTC

This package is not auto-updated.

Last update: 2024-11-10 06:54:09 UTC


README

Description

This package uses QuentinBontemps/php-mondialrelay-api.

This client allow to use the Mondial Relay Soap API with Laravel.

Requirements

  • PHP >= 5.6
  • php-soap extension

Installation

composer require quentinbontemps/laravel-mondialrelay

If you're on Laravel 5.4 or earlier, you'll need to add the following to your config/app.php :

'providers' => [
    // ... 
    \QuentinBontemps\LaravelMondialRelay\LaravelMondialRelayServiceProvider::class,
],

Configuration

You need configure your MondialRelay ids :

You have two solutions :

php artisan vendor:publish --tag=laravel_mondialrelay_config

Usage

use QuentinBontemps\LaravelMondialRelay\Facades\LaravelMondialRelay;

$client = LaravelMondialRelay::client();

$shops = $client->findDeliveryPoints([
    'Pays'            => 'FR',
    'Ville'           => 'Paris',
    'CP'              => '75000',
    'DelaiEnvoi'      => "0",
    'RayonRecherche'  => '20',
    'NombreResultats' => '10',
]);

Contribution

Contributions are always welcome.