Download the PHP package alexpechkarev/postcode-anywhere without Composer

On this page you can find all versions of the php package alexpechkarev/postcode-anywhere. 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 postcode-anywhere

Laravel API Wrapper for Loqate / PCA Predict (formerly Postcode Anywhere)

Build Status

This wrapper simplifies process of making API calls to Loqate web services down to a single line of code within your Laravel application!

Dependency

This package requires the PHP cURL extension to be installed on your system.

Contents

Installation

Pull in the package using Composer

composer require alexpechkarev/postcode-anywhere

Note: If you are using Laravel 5.5, the next steps are unnecessary. This package supports Laravel Package Discovery.

Include the service provider within config/app.php.

Include the facade within config/app.php.

Configuration

This package supports configuration.

You can publish the config file with:

When published, the config/postcodeanywhere.php config file contains:

The configuration file has a multidimensional array called 'services' that defines web services by type; 'find' and 'retrieve'.

Feel free to add / remove any other Loqate / PCA Predict Services.

Usage

Here is an example of making call to find address records for the given postcode.

Within your application call \PA::getResponse( array $param ) with array of parameters.

Example:

Note: endpoint is defaulted to json when it is omitted.

Detailed Example

You could have a Service Class, for example Loqate, and within this class you can do the heavy lifting in a __construct or __invoke magic method. Please find an example below:

To use the above Service class, you could do something souch as the following:

For more information, please see Loqate's API documentation PostcodeAnywhere Interactive FindByPostcode (v1.00) for required parameters and response.

Support

If you find an error or have any suggestions, please open an issue on GitHub.

License

Laravel API wrapper for Loqate / PCA Predict (formerly Postcode Anywhere) is released under the MIT License. See the bundled LICENSE file for details.


All versions of postcode-anywhere with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 5.*
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 alexpechkarev/postcode-anywhere contains the following files

Loading the files please wait ....