Skip to content
Laravel package for getAddress.io
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
database/migrations
src
tests
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
phpunit.xml

README.md

Stable Build Build Status StyleCI

Laravel getAddress.io Package

This package allows you to easily interact with the getAddress.io API and cache full postcode results to reduce quota usage.

🚀 Quick Start

Installation

Require the package in the composer.json of your project.

composer require laralabs/get-address-io

Publish the configuration file.

php artisan vendor:publish --tag=getaddress-config

Edit the configuration file and set your desired settings, the cache is disabled by default and you will need to set the following env variables:

GETADDRESS_API_KEY=
GETADDRESS_ADMIN_KEY=

If you have enabled the cache, make sure you run the migration:

php artisan migrate

Usage

A helper function and facade is available, choose your preferred method.

Perform a lookup:

$results = get_address()->find($postcode, $property);

Perform an expanded lookup:

$results = get_address()->expand()->find($postcode, $property);

The $property argument is optional, just searching for a postcode will return all results for that postcode and also cache the data if the cache has been enabled.

📌 Todo

  • Admin Features.
  • Unit Tests.

💬 Support

Please raise an issue on GitHub if there is a problem.

🔑 License

This is open-sourced software licensed under the MIT License.

You can’t perform that action at this time.