bilalbentoumi / fakerphp-dz

Home Page:https://packagist.org/packages/bilalbentoumi/fakerphp-dz

Repository from Github https://github.combilalbentoumi/fakerphp-dzRepository from Github https://github.combilalbentoumi/fakerphp-dz

Algeria Providers for FakerPHP

Algeria providers extension for fakerphp/faker

Installation

composer require bilalbentoumi/fakerphp-dz

Documentation

How to use each provider with examples

Person (AR)

$faker = Faker\Factory::create();
$faker->addProvider(new BilalBentoumi\Faker\Provider\ar_DZ\Person($faker));

echo $faker->name();
// 'فريد شيباني'

echo $faker->firstName();
// 'أسامة'

echo $faker->firstName('female');
// 'نسرين'

echo $faker->lastName();
// 'بلحاج'

Person (FR)

$faker = Faker\Factory::create();
$faker->addProvider(new BilalBentoumi\Faker\Provider\fr_DZ\Person($faker));

echo $faker->name();
// 'Yousra Kadi'

echo $faker->firstName();
// 'Mouloud'

echo $faker->firstName('female');
// 'Asma'

echo $faker->lastName();
// 'Boumediene'

Resources