PHP code example of worksome / laravel-ip-geolocation
1. Go to this page and download the library: Download worksome/laravel-ip-geolocation 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/ */
worksome / laravel-ip-geolocation example snippets
use Worksome\IpGeolocation\Facades\IpGeolocation;
/** @var \Worksome\IpGeolocation\DataValues\Location $location */
$location = IpGeolocation::location('2606:4700:4700::1111');
echo $location->country;
echo $location->city;
echo $location->zipcode;
bash
php artisan vendor:publish --tag="ip-geolocation-config"