PHPackages                             alexpechkarev/postcode-anywhere - 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. [API Development](/categories/api)
4. /
5. alexpechkarev/postcode-anywhere

ActiveLibrary[API Development](/categories/api)

alexpechkarev/postcode-anywhere
===============================

Laravel API wrapper for PCA Predict formerly Postcode Anywhere

v1.1(8y ago)57.7k7MITPHP

Since Aug 12Pushed 6y ago2 watchersCompare

[ Source](https://github.com/alexpechkarev/postcode-anywhere)[ Packagist](https://packagist.org/packages/alexpechkarev/postcode-anywhere)[ RSS](/packages/alexpechkarev-postcode-anywhere/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

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

[](#laravel-api-wrapper-for-loqate--pca-predict-formerly-postcode-anywhere)

[![Build Status](https://camo.githubusercontent.com/35898757acdff4219c7653373e92d68adccdb101d765ebee715379d63a2e2b2b/68747470733a2f2f7472617669732d63692e6f72672f616c6578706563686b617265762f706f7374636f64652d616e7977686572652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alexpechkarev/postcode-anywhere)

This wrapper simplifies process of making API calls to [**Loqate**](https://www.loqate.com/en-gb/) web services down to a single line of code within your [**Laravel**](http://laravel.com/) application!

Dependency
----------

[](#dependency)

This package requires the [**PHP cURL**](http://php.net/manual/en/curl.installation.php) extension to be installed on your system.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Detailed Example](#example)
- [Support](#support)
- [License](#license)

Installation
------------

[](#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](https://laravel.com/docs/5.5/packages#package-discovery).

Include the service provider within `config/app.php`.

```
'providers' => [
    ...
    PostcodeAnywhere\PAServiceProvider,
],
```

Include the facade within `config/app.php`.

```
'aliases' => [
    ...
    'PA' => PostcodeAnywhere\PAFacade::class,
]
```

Configuration
-------------

[](#configuration)

This package supports configuration.

You can publish the config file with:

```
php artisan vendor:publish --provider="PostcodeAnywhere\PAServiceProvider" --tag="config"
```

When published, [the `config/postcodeanywhere.php` config file](https://github.com/alexpechkarev/postcode-anywhere/blob/master/src/config/postcodeanywhere.php) contains:

```
