PHPackages                             agriya/webshopshipments - 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. agriya/webshopshipments

ActiveLibrary

agriya/webshopshipments
=======================

69PHP

Since May 21Pushed 11y ago8 watchersCompare

[ Source](https://github.com/agriya/webshopshipments)[ Packagist](https://packagist.org/packages/agriya/webshopshipments)[ RSS](/packages/agriya-webshopshipments/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

WebshopShipments
================

[](#webshopshipments)

This package is to manage the shipping fee for the countries and product in the site. You can manage shipping fees easily by calling some easy function Instatllation
=============

[](#instatllation)

1. Install the package by add the following line in composer.json of your root directory

    "require": { ... ... "agriya/webshopshipment": "dev"

    },

    And then run "composer update"

2, After the package loaded add this line to app/conifg/app.php in the 'providers' array as like follows

```
'providers' => array(
	...
	...
	'Agriya\Webshopshipments\WebshopshipmentsServiceProvider',
}

```

3. After that publish the configuration by run the following command

    If this is a package, then run the following php artisan config:publish agriya/webshopshipments

    if this is a workbench folders the run the following command php artisan config:publish --path="workbench/agriya/webshopshipments/src/config/" agriya/webshopshipments

    After published the configuration, you can provide your own table details to where the countries and shipping fee details should be stored. The configuration file will look likes follows,

    ```

     /*
     *Table name for coutries list
     */
     'countries_table_details'	=>	array(
     	'table_name' => 'countries',
     	'id' => 'id',
     	'country_name' => 'country_name',
     ),

     /*
     *Table name for shipping fees
     */
     'shipping_fees_table_details'	=>	array(
     	'table_name' => 'shipping_fees',
     	'id' => 'id',
     	'country_id' => 'country_id',
     	'shipping_fee' => 'shipping_fee',
     	'foreign_id' => 'foreign_id'
     ),

    ```
4. You can also use our database migration if you dont have the table to store countries and shipping fee details. If you dont have the tables, then run the following commands. This will create you two tables

    For published package php artisan migrate --package=Agriya/Webshopshipments

    For workbench package php artisan migrate --bench=Agriya/Webshopshipments

    Note: run these commands needs to be run from your root directory (where the composer.json has placed)

Thats it of installation. :)

Usage
=====

[](#usage)

---

### Countries list

[](#countries-list)

Webshopshipments::getCountriesList(\[String $return = 'list'\]) Parameters
----------

[](#parameters)

$return(optional) This can be either 'list' or 'all'. (default is 'list')

'list' This will return the result as "country id" and "country name" combination 'all' This will return all the fields from the countries table

### Add shipping details

[](#add-shipping-details)

Webshopshipments::addShipments(array('country\_id' =&gt; $country, 'foreign\_id' =&gt; $foreign\_id, 'shipping\_fee' =&gt; $shipping\_fee )) Parameters
----------

[](#parameters-1)

Array (mandatory - all 3 fields are mandatory)

'country\_id' Id of the country. This is the id that have stored in the countries table 'foreign\_id' This is the id of the item or product for which you need to specify the shipping fee 'shipping\_fee' Shipping fee that you want to store for the specified country\_id and foreign\_id

### Update shipping details

[](#update-shipping-details)

Webshopshipments::updateShippingFee(array('country\_id' =&gt; $country, 'foreign\_id' =&gt; $foreign\_id, 'shipping\_fee' =&gt; $shipping\_Fee), $primary\_id = null); Parameters
----------

[](#parameters-2)

Array(mandatory - 'shipping\_fee' is mandatory. 'country\_id' and 'foreign\_id' is mandatory if the second parameter is not specified) 'country\_id' Country id (not manadatory if $primary\_id is defined) 'foreign\_id' Id of your product or item for which you have stored the shipping fee (not manadatory if $primary\_id is defined) 'shipping\_fee' Shipping fee that you want to update for the specified country and foreign id.

$primary\_id(if 'country\_id' and 'foreign\_id' is specified, then this parameter is not required.) Primary id that is stored in the shipping\_fees table (not mandatory if both 'country\_id' and 'foreign\_id' is specified in the first parameter array)

### Delte shipping details

[](#delte-shipping-details)

Webshopshipments::updateShippingFee(array('country\_id' =&gt; $country, 'foreign\_id' =&gt; $foreign\_id, 'shipping\_fee' =&gt; $shipping\_Fee), $primary\_id = null); Parameters
----------

[](#parameters-3)

Array(mandatory - 'shipping\_fee' is mandatory. 'country\_id' and 'foreign\_id' is mandatory if the second parameter is not specified) 'country\_id' Country id (not manadatory if $primary\_id is defined) 'foreign\_id' Id of your product or item for which you have stored the shipping fee (not manadatory if $primary\_id is defined)

$primary\_id(if 'country\_id' and 'foreign\_id' is specified, then this parameter is not required.) Primary id that is stored in the shipping\_fees table (not mandatory if both 'country\_id' and 'foreign\_id' is specified in the first parameter array)

### Item shipping list

[](#item-shipping-list)

Webshopshipments::getItemShippingList($foreign\_id); Parameters
----------

[](#parameters-4)

$foreign\_id(mandatory) This is the product id or item id that you have stored the shipping is for. This will return the list of shipping\_fees that are added and country details for it.

### Shipping details for Product and country

[](#shipping-details-for-product-and-country)

Webshopshipments::updateShippingFee(array('country\_id' =&gt; $country, 'foreign\_id' =&gt; $foreign\_id,), $primary\_id = null); Parameters
----------

[](#parameters-5)

Array(mandatory - 'shipping\_fee' is mandatory. 'country\_id' and 'foreign\_id' is mandatory if the second parameter is not specified) 'country\_id' Country id (not manadatory if $primary\_id is defined) 'foreign\_id' Id of your product or item for which you have stored the shipping fee (not manadatory if $primary\_id is defined)

$primary\_id(if 'country\_id' and 'foreign\_id' is specified, then this parameter is not required.) Primary id that is stored in the shipping\_fees table (not mandatory if both 'country\_id' and 'foreign\_id' is specified in the first parameter array)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2284930604d5f857ed064491674b1f56e6c0eaed1b00d00b54f8f35a791a7974?d=identicon)[agriya](/maintainers/agriya)

---

Top Contributors

[![rsensan](https://avatars.githubusercontent.com/u/351331?v=4)](https://github.com/rsensan "rsensan (1 commits)")

### Embed Badge

![Health badge](/badges/agriya-webshopshipments/health.svg)

```
[![Health](https://phpackages.com/badges/agriya-webshopshipments/health.svg)](https://phpackages.com/packages/agriya-webshopshipments)
```

PHPackages © 2026

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