Download the PHP package lodge/postcode-lookup without Composer
On this page you can find all versions of the php package lodge/postcode-lookup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lodge/postcode-lookup
More information about lodge/postcode-lookup
Files in lodge/postcode-lookup
Package postcode-lookup
Short Description A postcode lookup utility using the Google Maps API, ready to use with Laravel 5.
License MIT
Informations about the package postcode-lookup
Postcode Lookup
PHP library that performs a postcode lookup using Google Maps API.
Compatible with Laravel 4-8.
Quick start
First of all you need to require the package inside your composer.json
file:
Note: for Laravel 4 use version 0.3.0
Register with Laravel
Register the service provider. Inside your app.php
config file add:
A facade is also provided, so in order to register it add the following to your app.php
config file:
Publish the configuration file.
Set your Google API key inside config/postcode.php
file.
Usage with Laravel
From within your controller you can call:
Get the Latitude and Longitude of an address
Usage outside of Laravel
If you need to get just the latitude and longitude for an address you can use:
Changelog
-
Version 0.7
- Added support for Laravel 8
-
Version 0.6
- Added support for Laravel 7
-
Version 0.4
- Added configuration file and the ability to set the Google API key.
- Updated namespaces to PSR-4
- Added test stubs.
- Dropped support for Laravel 4.
-
Version 0.3
- Removed deprecated
bind
call and instantiate as a singleton instead.
- Removed deprecated
-
Version 0.2
- Laravel 5 compatible
- Fixed facade namespace, that would not adhere to PSR-0
- Updated documentation
- Version 0.1
- Initial Release
License
The MIT License (MIT)
Copyright (c) 2013-2015 Dan Ursu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.