Skip to content
🐙 Provides additional providers for fzaninotto/faker.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.travis
src
test/Unit
.editorconfig
.gitattributes
.gitignore
.php_cs
.travis.yml
CHANGELOG.md
LICENSE
Makefile
README.md
composer.json
composer.lock
infection.json
phpstan.neon

README.md

faker-provider

Build Status codecov Latest Stable Version Total Downloads

Provides additional providers for fzaninotto/faker.

Installation

Run

$ composer require --dev localheinz/faker-provider

Usage

First obtain an instance of Faker\Generator:

use Faker\Factory;

$faker = Factory::create();

Then add providers like this:

use Localheinz\Faker\Provider;

$faker->addProvider(new Provider\AvatarUrlProvider($faker));

Providers

This package provides the following providers for use with fzaninotto/faker:

AvatarUrlProvider

use Faker\Generator;
use Localheinz\Faker\Provider;

/** @var Generator&Provider\AvatarUrlProvider $faker */
$url = $faker->adorableAvatarUrl();

$urlWithFixedIdentifier = $faker->adorableAvatarUrl('localheinz');

$urlWithFixedIdentifierAndSize = $faker->adorableAvatarUrl(
    'localheinz',
    150
);

Example of

Also see avatars.adorable.io.

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

You can’t perform that action at this time.