PHP code example of webklex / laravel-geoip

1. Go to this page and download the library: Download webklex/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/ */

    

webklex / laravel-geoip example snippets


\Webklex\LaravelGeoIP\Providers\GeoIPServiceProvider::class,

'GeoIP' => \Webklex\LaravelGeoIP\Facades\GeoIP::class,

use Webklex\LaravelGeoIP\Facades\GeoIP;

var_dump(GeoIP::current());
var_dump(GeoIP::get("205.13.135.36"));

echo 'your php code...';
shell
php artisan vendor:publish --provider="Webklex\LaravelGeoIP\Providers\GeoIPServiceProvider"