Download the PHP package laratables/laravel-shipping without Composer

On this page you can find all versions of the php package laratables/laravel-shipping. 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 laravel-shipping

laratables/laravel-shipping

A weight-based shipping cost calculator for Laravel with database-driven weight bands, free shipping thresholds, flat-rate fallback, and a global on/off toggle.

Requirements

Installation

Publish and run the migration:

Publish the config file:

Seed the default weight bands:

Usage

Resolving shipping for a cart

Cart item shape

Per-product priority rule

weight_kg shipping_cost Result
set any Algorithm used, shipping_cost ignored
null set Flat rate used directly
null null Not shippable, skipped

Product estimate

Using the Facade

Configuration

All settings are in config/shipping.php and driven by environment variables:

Key .env Default Description
enabled SHIPPING_ENABLED true Master on/off toggle
disabled_fallback.mode SHIPPING_DISABLED_MODE free free, flat_rate, or unavailable
disabled_fallback.flat_rate_amount SHIPPING_FLAT_RATE_AMOUNT 5.99 Fixed charge when mode is flat_rate
base_fee SHIPPING_BASE_FEE 2.50 Handling fee on every order
multi_product_surcharge SHIPPING_MULTI_PRODUCT_SURCHARGE 1.50 Added when cart has >1 product line
heavy_item_threshold_kg SHIPPING_HEAVY_ITEM_THRESHOLD_KG 10.0 Line weight that triggers heavy surcharge
heavy_item_surcharge SHIPPING_HEAVY_ITEM_SURCHARGE 3.00 Charge per heavy product line
max_weight_kg SHIPPING_MAX_WEIGHT_KG 100.0 Maximum shippable order weight
free_enabled SHIPPING_FREE_ENABLED true Enable free shipping threshold
free_threshold SHIPPING_FREE_THRESHOLD 75.00 Subtotal needed for free shipping
free_weight_limit_kg SHIPPING_FREE_WEIGHT_LIMIT_KG null Max weight still eligible for free shipping

Weight bands

Bands are stored in shipping_weight_bands and managed from your admin panel. After updating bands, clear the cache:

Disabled modes

Mode Behaviour
free All orders ship free
flat_rate Fixed charge on every order
unavailable Throws RuntimeException, block checkout

Testing

License

MIT


All versions of laravel-shipping with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.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 laratables/laravel-shipping contains the following files

Loading the files please wait ...