PHPackages                             softrang/parcel-helper - 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. softrang/parcel-helper

ActiveLibrary[API Development](/categories/api)

softrang/parcel-helper
======================

A small helper to place orders using API keys from env/config.

v1.0.3(6mo ago)08MITPHPPHP ^8.2

Since Nov 6Pushed 6mo agoCompare

[ Source](https://github.com/softrang/parcel-helper)[ Packagist](https://packagist.org/packages/softrang/parcel-helper)[ RSS](/packages/softrang-parcel-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Laravel Parcel Helper (by Softrang)
===================================

[](#laravel-parcel-helper-by-softrang)

A simple, developer-friendly Parcel Helper for Laravel 12+ to easily create and manage consignments with SteadFast and other supported services. created by [Softrang](https://softrang.com).

Features
========

[](#features)

- Simple API for creating parcels/orders.
- Supports SteadFast and other courier services.
- Automatically stores consignment details in your database.
- Clean, professional, and Laravel-native.

Requirements
============

[](#requirements)

- PHP 8.1+
- Laravel 12+
- Composer

Installation
============

[](#installation)

### Install via Composer

[](#install-via-composer)

```
composer require softrang/parcel-helper
```

### Publish the config:

[](#publish-the-config)

```
php artisan vendor:publish --tag= parcel-helpar
```

Environment Configuration
=========================

[](#environment-configuration)

### Add your API keys to your .env file:

[](#add-your-api-keys-to-your-env-file)

```
PACKZY_API_KEY=your_api_key
PACKZY_SECRET_KEY=your_secret_key
```

Usage
=====

[](#usage)

Sample Controller
-----------------

[](#sample-controller)

```
validate([
            'invoice' => 'required|string|max:50',
            'name' => 'required|string|max:255',
            'phone' => 'required|string|max:20',
            'address' => 'required|string|max:500',
            'amount' => 'required|numeric|min:0',
        ]);

        try {
            // Create order via ParcelHelper
            $response = ParcelHelper::steadfastCreateOrder([
                'invoice' => $validated['invoice'],
                'recipient_name' => $validated['name'],
                'recipient_phone' => $validated['phone'],
                'recipient_address' => $validated['address'],
                'cod_amount' => $validated['amount'],
            ]);

            if ($response['status'] === 200 && isset($response['consignment'])) {
                $c = $response['consignment'];

                // Save consignment in DB
                $consignment = Consignment::create([
                    'consignment_id' => $c['consignment_id'],
                    'invoice' => $c['invoice'],
                    'tracking_code' => $c['tracking_code'],
                    'recipient_name' => $c['recipient_name'],
                    'recipient_phone' => $c['recipient_phone'],
                    'recipient_address' => $c['recipient_address'],
                    'cod_amount' => $c['cod_amount'],
                    'status' => $c['status'],
                ]);

                return response()->json([
                    'success' => true,
                    'message' => 'Consignment created and saved successfully.',
                    'data' => $consignment,
                ], 201);
            }

            return response()->json([
                'success' => false,
                'message' => 'Failed to create consignment from API.',
                'api_response' => $response,
            ], 400);

        } catch (\Exception $e) {
            return response()->json([
                'success' => false,
                'message' => 'An error occurred while processing your request.',
                'error' => $e->getMessage(),
            ], 500);
        }
    }
```

Database Setup
==============

[](#database-setup)

### Ensure you have a consignments table:

[](#ensure-you-have-a-consignments-table)

```
Schema::create('consignments', function (Blueprint $table) {
    $table->id();
    $table->string('consignment_id')->unique();
    $table->string('invoice');
    $table->string('tracking_code')->nullable();
    $table->string('recipient_name');
    $table->string('recipient_phone');
    $table->text('recipient_address');
    $table->decimal('cod_amount', 10, 2)->default(0);
    $table->string('status')->nullable();
    $table->timestamps();
});
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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 ~1 days

Total

4

Last Release

190d ago

PHP version history (2 changes)v1.0.1PHP ^8.0

v1.0.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e67d49e6c18bf156c75f8c2a1c4a0c51018bc3c0a1568f89cffc6b016228dd6?d=identicon)[softrang](/maintainers/softrang)

---

Top Contributors

[![softrang](https://avatars.githubusercontent.com/u/152640876?v=4)](https://github.com/softrang "softrang (5 commits)")

### Embed Badge

![Health badge](/badges/softrang-parcel-helper/health.svg)

```
[![Health](https://phpackages.com/badges/softrang-parcel-helper/health.svg)](https://phpackages.com/packages/softrang-parcel-helper)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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