PHP code example of sicaboy / echoip-laravel

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

    

sicaboy / echoip-laravel example snippets


return [
    'api_key' => env('ECHOIP_API_KEY'),
    'api_url' => env('ECHOIP_API_URL', 'https://echoip.yourdomain.com'),
];

use Sicaboy\EchoipLaravel\Facades\Echoip;

EchoipLaravel::getInfo('1.1.1.1');
EchoipLaravel::getInfo(request()->ip())
bash
php artisan vendor:publish --tag="echoip-laravel-config"