1. Go to this page and download the library: Download yomo/addressfactory 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/ */
$address = $faker->realAddress('Brazil') # From any of the defined cities
$address = $faker->realAddress('Brazil', 'Rio de Janiero'); # For Rio de Janiero only
$address = $faker->realAddresss('Brazil', ['Rio de Janiero', 'Salvador']) # Multiple cities
use Yomo\AddressFactory\Facades\RealAddress;
.
.
.
$johannesburgAddresses = RealAddress::makeSouthAfrica(20, 'Johannesburg'); # 20 addresses for Johannesburg, South Africa
$frenchAddress = RealAddress::makeFrance(1); # A single address for France
$brazilAddresses = RealAddress::make(10, 'Brazil'); # 10 addresses for the custom country of Brazil
$f = new \Yomo\AddressFactory\RealAddress();
$southAfricanPoints = $f->makeSouthAfrica(4); # Generates 4 locations within South Africa's major cities
$capeTownPoints = $f->makeSouthAfrica(2, 'Cape Town'); # Generates 2 locations from Cape Town, South Africa
$multiPoints = $f->makeSouthAfrica(3, ['Pretoria', 'Johannesburg']);