PHP code example of erag / locationerag

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

    

erag / locationerag example snippets


return [
    // ...
    LocationErag\LocationEragServiceProvider::class
];

'providers' => [
    // ...
    LocationErag\LocationEragServiceProvider::class,
];



use Illuminate\Support\Facades\Route;
use LocationErag\Get\Location;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
| Register web routes for your application.
|--------------------------------------------------------------------------
*/

Route::get('/', function () {
    echo '<pre>';
    print_r(Location::MapData(226010)); // Example: Get location data using a PIN code.
});