A Laravel faker library to generate typical Nigeria fake data ranging from name, address, phone number, LGAs and states for you. It supports Yoruba, Igbo, and Hausa ethnic groups with culturally authentic data.
# Laravel NaijaFaker
## Introduction đź‘‹
A comprehensive package that generates fake, culturally authentic Nigerian data — names, addresses, phone numbers, bank accounts, universities, companies, and much more. Supports three major ethnic groups: **Yoruba**, **Igbo**, and **Hausa**.
> NB: Nigeria as a country has so many languages. `Yoruba`, `Igbo` and `Hausa` are the only languages supported at the moment.
## Installation
Install via composer
```bash
composer require kodegrenade/naija-faker-laravel
```
Add service provider to the `config/app.php` file
```php
[
...
Kodegrenade\NaijaFaker\NaijaFakerServiceProvider::class,
];
...
```
Add alias to the `config/app.php` file
```php
'aliases' => [
...
'NaijaFaker' => Kodegrenade\NaijaFaker\NaijaFaker::class,
];
...
```
## Usage 🧨
> **NOTE**
> All methods return associative arrays or strings.
---
### Seeded / Deterministic Mode
Set a seed for reproducible output (useful for testing):
```php
'yoruba',
'gender' => 'male',
'network' => 'mtn',
]);
```
---
### Person
Generate fake person data.
```php
'Engr.',
'firstName' => 'Akintunde',
'lastName' => 'Owoyele',
'fullName' => 'Akintunde Owoyele',
'email' => 'akintunde.owoyele@gmail.com',
'phone' => '+2349093636382',
'address' => 'Plot 63, Ebubedike Uzoma Avenue, Awka',
]
```
### People
Generate multiple fake people.
```php
"Ahmed Maikudi"
```
### Title
Generate a fake Nigerian title.
```php
"Chief"
```
### Email Address
Generate a fake email address.
```php
"temitope.ayotunde@gmail.com"
$email = NaijaFaker::email('Temitope Ayotunde', 'workplace.com');
// => "temitopeayotunde@workplace.com"
```
### Address
Generate a fake Nigerian address.
```php
"Plot 45, Oluwaseun Adedayo Street, Ibadan"
```
### Phone Number
Generate a fake Nigerian phone number.
```php
**NOTE**: Supported networks are `mtn`, `glo`, `9mobile` & `airtel`
```php
$phone = NaijaFaker::phoneNumber('mtn');
// => "+2347037653761"
```
### States & LGAs
```php
"22345678901"
```
#### …