Download the PHP package softrang/parcel-helper without Composer

On this page you can find all versions of the php package softrang/parcel-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package parcel-helper

��# 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

<ul>

<li>Simple API for creating parcels/orders.</li>

<li>Supports SteadFast and other courier services.</li>

<li>Automatically stores consignment details in your database.</li>

<li>Clean, professional, and Laravel-native.</li>

</ul>

# Requirements

<ul>

<li>PHP 8.1+</li>

<li>Laravel 12+</li>

<li>Composer</li>

</ul>

# Installation

### Install via Composer

`bash

composer require softrang/parcel-helper

`

### Publish the config:

`bash

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

`

# Environment Configuration

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

`bash

PACKZYAPIKEY=yourapikey

PACKZYSECRETKEY=yoursecretkey

`

# Usage

## Sample Controller

`bash

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use Softrang\ParcelHelper\Facades\ParcelHelper;

use App\Models\Consignment;

public function sendSteadFast(Request $request)

{

// Validate request

$validated = $request->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([

'consignmentid' => $c['consignmentid'],

'invoice' => $c['invoice'],

'trackingcode' => $c['trackingcode'],

'recipientname' => $c['recipientname'],

'recipientphone' => $c['recipientphone'],

'recipientaddress' => $c['recipientaddress'],

'codamount' => $c['codamount'],

'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

### Ensure you have a consignments table:

`bash

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();

});

`


All versions of parcel-helper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package softrang/parcel-helper contains the following files

Loading the files please wait ...