sergeevpasha/laravel-pecom

Pecom API wrapper for Laravel
1,856 1
Install
composer require sergeevpasha/laravel-pecom
Latest Version:v1.4.1
PHP:^8.0
License:MIT
Last Updated:Nov 6, 2025
Links: GitHub  ·  Packagist
Maintainer: sergeevpasha

Maintainability Test Coverage CodeFactor Generic badge Generic badge

Laravel PECOM API Wrapper

Allows you to:

  • Find a City by query string
  • Find all Terminals in the City by City ID
  • Calculate a delivery price

Pre-requirements

You need to get Pecom API key and login. Key can be obtained in your cabinet at https://kabinet.pecom.ru/profile

Installation

Configuration

This package has a few configuration values:

If you only need to use PecomClient, you may completely skip this configuration. Otherwise, you can use default options and just specify PECOM_KEY and PECOM_USER at .env file. To make full use of predefined routes, you will need to publish config:

Now you can change routes prefix and middleware to whatever you need

Use Case #1

After installing, you may just import the client

Now you need to initialize it:

Now we can use these methods:

Delivery Object

To build a Delivery object you will need to pass an array to fromArray() method just like that:

Use Case #2

There are some predefined routes, that will be merged with your routes as well. You may check it by using

It actually exposes the same methods to the routes, so it should be pretty clear on how to use it. For more information on how to use it, please check out src/ folder.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

404,034,618 608
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

384,821,166 4,658