Download the PHP package teampickr/php-google-maps-distance-matrix without Composer

On this page you can find all versions of the php package teampickr/php-google-maps-distance-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 php-google-maps-distance-matrix

PHP Google Maps Distance Matrix API

This is a simple package that allows access to the Google Maps Distance Matrix API using a (mostly) fluent API. There is support for both the Standard License and Premium/Enterprise License types provided by Google.

Installation

Install the package using composer:

Frameworks

At the moment we only have framework compatibility for Laravel. However, we welcome PRs to add further framework specific behavior as long as it doesn't prevent the package working for others, or pull in dependencies that are not optional (suggested).

Laravel

If you are using Laravel then you can use our service provider. If you have Laravel >5.5 then the package will be auto discovered upon install. Else, add the following to your config/app.php file:

Facades

Personally, I hate facades. However, I know people like them. If you are using Laravel >5.5 then the facade will be automatically discovered. Else, you can add it in your config/app.php file.

Configuration

First, make sure you have copied the configuration file:

This will make a config/google.php file, this is where your API Key / License information is fetched from. By default we use the .env configuration values to get your API key.

If you have a standard api key all you need to add to your .env is:

If you are a Premium / Enterprise Google Maps user, and use a encryption key and client ID then you should add the following to your .env:

Please, make sure you don't store your keys in version control!

Usage

License / API Key

Before making requests you need to create your License object. If you are a standard google maps user, then all you will need is your API key, then you can create your license as follows:

If you are a Premium / Enterprise google maps user, then you need to create your license as follows:

Then, you can start making your request:

Basic usage


All versions of php-google-maps-distance-matrix with dependencies

PHP Build Version
Package Version
Requires php Version >7.2
guzzlehttp/guzzle Version ^7.0.1
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 teampickr/php-google-maps-distance-matrix contains the following files

Loading the files please wait ....