PHPackages                             ahid-technologies/leopards-courier - 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. ahid-technologies/leopards-courier

ActiveLibrary[API Development](/categories/api)

ahid-technologies/leopards-courier
==================================

Laravel package for integrating with Leopards Courier API

1.1.0(9mo ago)010MITPHPPHP ^7.4|^8.0

Since May 17Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/ahid-technologies/leopards-courier)[ Packagist](https://packagist.org/packages/ahid-technologies/leopards-courier)[ RSS](/packages/ahid-technologies-leopards-courier/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

Ahid Leopards Courier
=====================

[](#ahid-leopards-courier)

A Laravel package for integrating with Leopards Courier API services.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ahid/leopards-courier
```

Changelog
---------

[](#changelog)

### Version 1.1.0

[](#version-110)

- **Validation Improvements**: Eased validation for track\_numbers and cn\_numbers to be more flexible
    - Track numbers now accept any string between 3-20 characters (previously required exactly 10 alphanumeric characters)
    - CN numbers now accept any string between 3-20 characters (previously required specific format patterns)
    - This change provides better compatibility with various tracking number formats

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Ahid\LeopardsCourier\AhidLeopardsServiceProvider"
```

Add your Leopards Courier API credentials to your `.env` file:

```
LEOPARDS_API_KEY=your_api_key
LEOPARDS_API_PASSWORD=your_api_password
LEOPARDS_API_ENVIRONMENT=staging # or production

```

Usage
-----

[](#usage)

### Get All Cities

[](#get-all-cities)

```
use Ahid\LeopardsCourier\Facades\LeopardsCourier;

// Get all cities
$cities = LeopardsCourier::getAllCities();
```

### Book a Packet

[](#book-a-packet)

```
use Ahid\LeopardsCourier\Facades\LeopardsCourier;

// Book a packet
$bookingData = [
    'booked_packet_weight' => 2000, // Weight in grams
    'booked_packet_no_piece' => 1,
    'booked_packet_collect_amount' => 2500,
    'booked_packet_order_id' => 'ORD-12345',
    'origin_city' => 'self', // or city ID
    'destination_city' => 789, // City ID from getAllCities
    'shipment_name_eng' => 'self',
    'shipment_email' => 'self',
    'shipment_phone' => 'self',
    'shipment_address' => 'self',
    'consignment_name_eng' => 'John Doe',
    'consignment_email' => 'john@example.com',
    'consignment_phone' => '03001234567',
    'consignment_address' => '123 Main St, Lahore',
    'special_instructions' => 'Handle with care'
];

$booking = LeopardsCourier::bookPacket($bookingData);
```

Available Methods
-----------------

[](#available-methods)

- `getAllCities()`: Get a list of all available cities with origin and destination status
- `bookPacket(array $data)`: Book a new shipment

Error Handling
--------------

[](#error-handling)

The package throws `LeopardsApiException` when the API returns an error. You can catch this exception to handle API errors:

```
use Ahid\LeopardsCourier\Exceptions\LeopardsApiException;

try {
    $cities = LeopardsCourier::getAllCities();
} catch (LeopardsApiException $e) {
    // Handle API error
    echo $e->getMessage();
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance56

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Total

3

Last Release

296d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147272059?v=4)[Muhammad Umar Farooq](/maintainers/ahid-technologies)[@ahid-technologies](https://github.com/ahid-technologies)

---

Top Contributors

[![ahid-technologies](https://avatars.githubusercontent.com/u/147272059?v=4)](https://github.com/ahid-technologies "ahid-technologies (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahid-technologies-leopards-courier/health.svg)

```
[![Health](https://phpackages.com/badges/ahid-technologies-leopards-courier/health.svg)](https://phpackages.com/packages/ahid-technologies-leopards-courier)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
