1. Go to this page and download the library: Download thorazine/location library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thorazine / location example snippets
$location = Location::locale('nl')->coordinatesToAddress(['latitude' => 52.385288, 'longitude' => 4.885361])->get();
$location = Location::locale('nl')->addressToCoordinates(['country' => 'Nederland', 'street' => 'Nieuwe Teertuinen', 'street_number' => 25])->get();
$location = Location::locale('nl')->postalcodeToCoordinates(['postal_code' => '1013 LV', 'street_number' => '25'])->coordinatesToAddress()->get();
$location = Location::locale('nl')->postalcodeToCoordinates(['postal_code' => '1013 LV', 'street_number' => '25'], true)->get();
$location = Location::locale('nl')->ipToCoordinates('46.44.160.221')->coordinatesToAddress()->get(); // if IP resolves properly, which it mostly doesn't
$location = Location::locale('nl')->ipToCoordinates('46.44.160.221', true)->get(); // if IP resolves properly, which it mostly doesn't
$location = Location::coordinatesToAddress(['latitude' => 52.385288, 'longitude' => 4.885361])->get();
Location::response(); // results in raw api response
php artisan vendor:publish --tag=location
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.