PHPackages                             faker-africa/faker-africa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. faker-africa/faker-africa

ActiveLibrary[Testing &amp; Quality](/categories/testing)

faker-africa/faker-africa
=========================

A comprehensive fake data generation library for African countries — Bénin, Togo, Côte d'Ivoire, Sénégal, and beyond.

v0.1.0(1mo ago)00MITPHPPHP ^8.1CI failing

Since Jun 10Pushed 1mo agoCompare

[ Source](https://github.com/MelvinTnd/faker_africa)[ Packagist](https://packagist.org/packages/faker-africa/faker-africa)[ Docs](https://github.com/faker-africa/faker-africa)[ RSS](/packages/faker-africa-faker-africa/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Faker Africa 🇧🇯🇹🇬🇨🇮🇸🇳
=====================

[](#faker-africa-)

**The first African-focused fake data generator for PHP &amp; Laravel.**

Faker Africa is a PHP library that extends FakerPHP with realistic African datasets — starting with **Bénin**, and expanding across Africa (Togo, Côte d'Ivoire, Sénégal, and more).

It helps developers build and test applications with **realistic local data instead of generic Western data**.

---

📦 Installation
--------------

[](#-installation)

```
composer require faker-africa/faker-africa:^0.1
```

---

🚀 Usage
-------

[](#-usage)

```
use Faker\Factory;
use FakerAfrica\Providers\BeninProvider;

$faker = Factory::create();
$faker->addProvider(new BeninProvider($faker));

// Generate data
echo $faker->beninFullName();   // Ahouansou Rodrigue
echo $faker->beninCity();       // Cotonou
echo $faker->mtnNumber();       // +229 01 97 45 23 18
echo $faker->xofAmount();       // 125000 XOF
```

---

🏗️ Laravel Setup
----------------

[](#️-laravel-setup)

```
use Faker\Factory;
use FakerAfrica\Providers\BeninProvider;

$faker = Factory::create();
$faker->addProvider(
    new FakerAfrica\Providers\BeninProvider($faker)
);
```

Auto-discovery is supported — no manual registration needed in Laravel.

---

🌍 Real World Example — Laravel Factory
--------------------------------------

[](#-real-world-example--laravel-factory)

```
use Faker\Factory;
use FakerAfrica\Providers\BeninProvider;

$faker = Factory::create();
$faker->addProvider(new BeninProvider($faker));

// Example: user seeding
User::factory()->create([
    'name'    => $faker->beninFullName(),
    'phone'   => $faker->mtnNumber(),
    'city'    => $faker->beninCity(),
    'balance' => $faker->xofAmount(),
]);
```

---

📌 Example Output
----------------

[](#-example-output)

```
Ahouansou Rodrigue
Cotonou
+229 01 97 45 23 18
125000 XOF

```

---

✨ Features (v0.1 — Bénin)
-------------------------

[](#-features-v01--bénin)

- 🇧🇯 Benin realistic names (first &amp; last names)
- 🏙️ Benin cities and departments
- 📞 MTN / Moov / Celtiis phone numbers format
- 🏠 Realistic Benin addresses
- 💰 XOF (FCFA) amount generator
- 🧑‍💼 Full name generator
- 📍 Localized data for African context

---

🏗️ Project Structure
--------------------

[](#️-project-structure)

```
src/
 └── Providers/
      └── BeninProvider.php

data/
 └── benin/
      ├── first_names.php
      ├── last_names.php
      ├── cities.php
      └── departments.php

```

---

🌍 Roadmap
---------

[](#-roadmap)

### v0.1 (current)

[](#v01-current)

- 🇧🇯 Bénin support

### v0.2

[](#v02)

- 🇹🇬 Togo support
- 🇨🇮 Côte d'Ivoire support

### v0.3

[](#v03)

- 🇸🇳 Sénégal support
- Mobile Money improvements

### v1.0

[](#v10)

- 🇨🇲 Cameroun
- 🇳🇬 Nigeria
- 🇬🇭 Ghana
- Full African coverage

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome!

You can help by:

- Adding new countries
- Improving datasets
- Adding phone formats
- Fixing bugs
- Improving documentation

Please open a Pull Request or Issue.

---

🎯 Why Faker Africa?
-------------------

[](#-why-faker-africa)

Most fake data libraries are designed for Western countries.

Faker Africa brings:

- African names
- African phone formats
- African cities
- African financial context (XOF, Mobile Money)

Making it perfect for:

- Laravel applications
- API testing
- E-commerce platforms
- School projects
- Startup MVPs

---

📄 License
---------

[](#-license)

MIT License © Faker Africa Contributors

Built on top of [FakerPHP](https://fakerphp.org/).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193603861?v=4)[Melvintnd](/maintainers/Melvintnd)[@MelvinTnd](https://github.com/MelvinTnd)

---

Top Contributors

[![MelvinTnd](https://avatars.githubusercontent.com/u/193603861?v=4)](https://github.com/MelvinTnd "MelvinTnd (4 commits)")

---

Tags

testingsymfonylaravelfakerseedingopen-sourceafricaFake databenindata-generation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/faker-africa-faker-africa/health.svg)

```
[![Health](https://phpackages.com/badges/faker-africa-faker-africa/health.svg)](https://phpackages.com/packages/faker-africa-faker-africa)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M42.7k](/packages/orchestra-testbench)[zenstruck/foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.

79613.7M157](/packages/zenstruck-foundry)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8220.3M81](/packages/orchestra-workbench)[osteel/openapi-httpfoundation-testing

Validate HttpFoundation requests and responses against OpenAPI (3+) definitions

1202.1M7](/packages/osteel-openapi-httpfoundation-testing)[mattiasgeniar/phpunit-query-count-assertions

A custom assertion for phpunit that allows you to count the amount of SQL queries used in a test. Can be used to enforce certain performance characteristics (ie: limit queries to X for a certain action).

164863.7k6](/packages/mattiasgeniar-phpunit-query-count-assertions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
