Download the PHP package gowelle/laravel-route-matrix without Composer

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

Laravel Route Matrix

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A Laravel wrapper for the Google Routes API with support for route calculation, distance matrices, and waypoint optimization.

Table of Contents

Features

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Add your Google API key to your .env file:

Quick Start

Usage

Basic Route Calculation

Using Addresses

Using Place IDs

With Intermediate Waypoints

Travel Modes

Traffic-Aware Routing

Route Modifiers

Alternative Routes

Fuel-Efficient Routes

Waypoint Optimization

Departure Time

Extra Computations

Custom Field Mask

Specify which fields to include in the response:

High Quality Polylines

Localization

Complete Example

Eloquent Integration (Routable Trait)

You can make your Eloquent models "routable" by implementing the Routable contract and using the HasRoute trait. This allows you to pass models directly to the API headers.

  1. Implement the interface and trait:

  2. Use models in route requests:

  3. Or initiate directly from the model:

Response Caching

To reduce API costs and improve performance, you can enable built-in caching.

  1. Configure caching in config/google-routes.php:

When enabled, identical requests (same origin, destination, and options) will be served from the cache for the specified TTL duration.

Route Matrix (Distance Matrix)

The Route Matrix API allows you to calculate distances and travel times between multiple origins and destinations efficiently.

One Origin to Multiple Destinations

Multiple Origins to One Destination

Many to Many (Full Matrix)

Sorting Results

RouteMatrixElement Properties

Each element in the matrix contains:

Helper methods:

Real-World Example: Courier Pickup & Delivery

A courier needs to pick up packages from multiple stores and deliver to customers (some packages share the same destination):

Output:

Response Objects

RoutesResponse

The main response object containing:

Route

Individual route containing:

Helper methods:

Configuration

The configuration file (config/google-routes.php) includes:

Exception Handling

The package throws specific exceptions:

Testing

Run the test suite:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


All versions of laravel-route-matrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
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 gowelle/laravel-route-matrix contains the following files

Loading the files please wait ...