PHP code example of emmadonjo / naija
1. Go to this page and download the library: Download emmadonjo/naija 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/ */
emmadonjo / naija example snippets
composer
use Emmadonjo\Naija\Naija;
// get list of states with minimal information
$states = Naija::states();
// get the comprehensive information of a state
$state = Naija::state('Abia');
// get name
$state->getName();
// get nick name
$state->getNickName();
// get official name
$state->getOfficialName();
// get short code
$state->getShortCode();
// get capital
$state->getCapital();
// get geo political zone
$state->getGeoPoliticalZone();
// get date created
$state->getDateCreated();
// get population
$state->getPopulation();
// get website
$state->getWebsite();
// get logo
$state->getLogo();
// get flag
$state->getFlag();
// get languages
$state->getLanguages();
// get LGAs
$state->getLgas();
// get areas - villages, cities, and towns
$state->getAreas();