PHP code example of imcity-tech / laravel-geonames

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

    

imcity-tech / laravel-geonames example snippets


protected function schedule(Schedule $schedule)
{
    $schedule->command('geonames:update')->dailyAt('4:00');
}

'filters' => [
    'countries' => ['AU', 'US']
]

'filters' => [
    'population' => 15000
]

'models' => [
    'continent' => false,
    'country' => App\Models\Country::class,
    'division' => App\Models\Division::class,
    'city' => App\Models\City::class,
],

'default_migrations' => false
bash
php artisan migrate
bash
php artisan geonames:insert

php artisan vendor:publish --tag=geonames-config

php artisan vendor:publish --tag=geonames-migrations
bash
php artisan migrate
bash
php artisan geonames:insert
bash
php artisan geonames:insert --reset