PHPackages                             avtocod/b2b-api-php-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. avtocod/b2b-api-php-laravel

ActiveLibrary[API Development](/categories/api)

avtocod/b2b-api-php-laravel
===========================

Laravel package for a working with B2B API service

v4.6.0(9mo ago)725.0k6MITPHPPHP ^8.1CI passing

Since Oct 14Pushed 9mo agoCompare

[ Source](https://github.com/avtocod/b2b-api-php-laravel)[ Packagist](https://packagist.org/packages/avtocod/b2b-api-php-laravel)[ RSS](/packages/avtocod-b2b-api-php-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (21)Used By (0)

 [![Laravel](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)](https://camo.githubusercontent.com/640c3d52b2764f179ef3cf089b604516a8c4ac0a06f055a46c6a7fce9428b787/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)

[B2B Api client](https://github.com/avtocod/b2b-api-php) integration for Laravel applications
---------------------------------------------------------------------------------------------

[](#b2b-api-client-integration-for-laravel-applications)

[![Version](https://camo.githubusercontent.com/8a4bac4b3576b2c23391f4f80c11c561c8e7cd9ed4a1b156f711e249ae90b672/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6176746f636f642f6232622d6170692d7068702d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avtocod/b2b-api-php-laravel)[![Version](https://camo.githubusercontent.com/177481e4bddc743cccda38dd7b64248efbc0e9db02419271b104239db4c758c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6176746f636f642f6232622d6170692d7068702d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://packagist.org/packages/avtocod/b2b-api-php-laravel)[![Build Status](https://camo.githubusercontent.com/ad32e75b2f8e010c46283c8321a3c7b52e67ed9b8b321f5fa86c8fb48b670b47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6176746f636f642f6232622d6170692d7068702d6c61726176656c2f74657374732e796d6c)](https://github.com/avtocod/b2b-api-php-laravel/actions)[![Coverage](https://camo.githubusercontent.com/bf6aaaa5064442ec6d7994068ad17ad04cd9f368da2cf936d16e9ecc2912d9c3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6176746f636f642f6232622d6170692d7068702d6c61726176656c2f6d61737465722e7376673f6d61784167653d3630)](https://codecov.io/gh/avtocod/b2b-api-php-laravel/)[![Downloads count](https://camo.githubusercontent.com/859d1a5d8cab0f7544e372a83e652098ae2e3bf58cdec456df66d0750c34fd93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6176746f636f642f6232622d6170692d7068702d6c61726176656c2e7376673f6d61784167653d313830)](https://packagist.org/packages/avtocod/b2b-api-php-laravel)[![License](https://camo.githubusercontent.com/7eee71ae3d13bdb91706741116102e4342efed77451c2a7be1bc064c5f7cd5c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6176746f636f642f6232622d6170692d7068702d6c61726176656c2e7376673f6c6f6e6743616368653d74727565)](https://github.com/avtocod/b2b-api-php-laravel/blob/master/LICENSE)

Install
-------

[](#install)

Require this package with composer using the following command:

```
$ composer require avtocod/b2b-api-php-laravel "^4.0"
```

> Installed `composer` is required ([how to install composer](https://getcomposer.org/download/)).

> You need to fix the major version of package.

After that you should "publish" package configuration file using next command:

```
$ php ./artisan vendor:publish --provider='Avtocod\B2BApi\Laravel\ServiceProvider'
```

And modify `./config/b2b-api-client.php`.

Usage
-----

[](#usage)

This package provides:

- Connections factory *(`ConnectionsFactoryInterface`)* - B2B API client factory *(configuration for it loads from published configuration file)*;
- Report types repository *(`RepositoryInterface`)* - single entry-point for getting access to the report types information;

In any part of your application you can resolve their implementations. For example, in artisan command:

```
