1. Go to this page and download the library: Download lostlink/laravel-geoip 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/ */
lostlink / laravel-geoip example snippets
LostLink\GeoIP\GeoIPServiceProvider::class
'GeoIP' => LostLink\GeoIP\Facades\GeoIP::class
use LostLink\GeoIP\GeoIP
$geoip = new GeoIP();
$lat = $geoip->getLatitude(); // 51.5141
$lon = $geoip->getLongitude(); // -3.1969
$geoip->getRaw(); // different drivers will return different data types
// Laravel
GeoIP::getRaw(); // different drivers will return different data types