squigg / ideal-postcodes-laravel
Laravel package for using the Ideal Postcodes API at https://ideal-postcodes.co.uk/
Requires
- guzzlehttp/guzzle: ^6.2
- illuminate/support: ^5.3
Requires (Dev)
- mockery/mockery: 0.9.5
- orchestra/testbench: ~3.3
- phpunit/phpunit: ^5.5
- satooshi/php-coveralls: v1.0.1
This package is auto-updated.
Last update: 2024-12-13 12:55:54 UTC
README
PHP Laravel 5 package for the Ideal Postcodes API.
Prerequisites
- PHP 5.5+
- Laravel 5.x
- Ideal Postcodes Account and API Key
Installation
Install by composer
You can find this library on Packagist.
To install ideal-postcodes-laravel with Composer, run the following command:
$ composer require squigg/ideal-postcodes-laravel
Configuration
The package publishes a configuration file to your config directory where you can update the configuration for your app.
$ php artisan vendor:publish --tag=config
Add the IdealPostcodesServiceProvider and (if desired) the Facade alias to your app.php
:
'providers' => [ ... 'Squigg\IdealPostcodes\IdealPostcodesServiceProvider', ], 'aliases' => [ ... 'IdealPostcodes' => 'Squigg\IdealPostcodes\Facades\IdealPostcodesFacade', ],
Add an IDEALPOSTCODES_API_KEY
to your .env
file with your Ideal Postcodes API key
IDEALPOSTCODES_API_KEY=ak_abcdefghijklmnopqrstuvwxyz
Configuration File Settings
All available settings are documented within the config/ideal-postcodes.php configuration file.
Usage
Simply call the \IdealPostcodes
Facade, or add a dependency in any constructor to IdealPostcodes
Change log
Copyright © 2016 Steve Strugnell. Released under the MIT License <docs/license.rst>
_.