PHP code example of tocaan / world

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

    

tocaan / world example snippets


composer isan vendor:publish --tag=world

php artisan migrate

php artisan db:seed --class=WorldSeeder
 
use Nnjeim\World\WorldHelper;

protected $world;

public function __construct(WorldHelper $world) {

	$this->world = $world;
}

$action = $this->world->cities([
	'filters' => [
		'country_id' => 182,
	],
]);

if ($action->success) {

	$cities = $action->data;
}

php artisan vendor:publish --tag=world --force