PHP library for generating random avatars based on avataaars

Overview

PHP Avataaar

PHP library for generating random avatars based on avataaars.

Installation

Dependencies

  • PHP 8.0
  • Composer 2.0

Install

Install the library via composer

composer require johnciacia/avataaar

Usage

Basic Usage

$avataaar = new \Avataaar\Avataaar();

$avataaar->url();

Faker

$faker = (new \Faker\Factory())::create();
$faker->addProvider(new \Avataaar\FakerProvider($faker));


echo $faker->avataaar;

Laravel

When using Laravel, this package will be discovered automatically and added to the applications Faker instance. Just call avataaar on the Faker instance and a random image URL will be generated.

 $this->faker->email,
            'avatar_url' => $this->faker->avataaar,
            'bio' => $this->faker->sentence,
        ];
    }
}

Credits

You might also like...
Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangerate.host

Currency Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangera

Small library providing some functional programming tools for PHP, based on Rambda

Functional library for PHP. Features: set of useful functions helpful in functional programming all functions are automatically curried every array ca

KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP
KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP

KLua KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP. Installation Since this is a FFI library, it needs a dynamic library avai

A library for property-based policy evaluation

PropAuth: Property-based policy evaluation Performing evaluations on credentials for authentication or sets of permissions on users has its limitation

Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

Deeper Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.De

A small library for validating International Bankaccount Numbers (IBANs) based on the IBAN Registry provided by SWIFT

A small library for validating International Bankaccount Numbers (IBANs) based on the IBAN Registry provided by SWIFT

Websocket chat room written in PHP based on workerman.

基于workerman的GatewayWorker框架开发的一款高性能支持分布式部署的聊天室系统。

A PHP Chat based on LE CHAT

General Information: This is a PHP Chat based on LE CHAT v.1.14. An up-to-date copy of this script can be downloaded at https://github.com/DanWin/le-c

Releases(1.1.0)
Owner
John Ciacia
John Ciacia
DTO Generator - PHP library for generating DTO classes

DTO Generator PHP library for generating DTO classes. Installation Use the package manager composer to install micro/dto. composer require micro/dto U

Micro PHP Framework 6 Dec 31, 2022
⚡ Php snippets, random stuff, demos, functions, fast message system, agnostic and framework free - 100% compactible ;) ⚡

⚡ Php8 FPM Nginx Fast, Scripts, Pearls & Treasures ?? Want to run and test asap ? docker-compose up -d phpgit_php8;ip=$(docker-machine ip default);ech

Benjamin FONTAINE 0 Mar 20, 2022
From the team that brought you laravel-random-command comes another gem!

?? Why require one if you can require them all? From the team that brought you laravel-random-command comes another gem! Requiring all our packages se

Spatie 46 Oct 5, 2022
This example shows how to estimate pi, using generated random numbers that uniformly distributed.

php-estimatepi This example shows how to estimate pi, using generated random numbers that uniformly distributed. Every pair of numbers produced will b

Oğuzhan Cerit 1 Nov 26, 2021
Instagram 4L 5L Username Finder / Random Username Finder

instagram-username-finder lang : EN Instagram 4L 5L Username Finder / Random Username Finder This Tool for 4length username finding If there is an emp

Yasin 11 Dec 2, 2022
WordPress block that displays a random "powered by" message, generally meant for footers.

X3P0 Powered By A block that generates a random "Powered by" message. It is meant to replace the typical "Powered by Theme/WordPress" message in foote

X3P0 4 Nov 4, 2022
Optimizes class loading performance by generating a single PHP file containing all of the autoloaded files.

Class Preloader for PHP This tool is used to generate a single PHP script containing all of the classes required for a specific use case. Using a sing

Class Preloader 356 Nov 26, 2022
A wrapper around symplify/config-transformer used to update recipes and using easy coding standard for generating readable config files.

Symfony Recipes Yaml to PHP Converter This is a wrapper around the symplify/config-transformer used to convert Symfony core recipes which uses .yaml c

Alexander Schranz 3 Nov 24, 2022
A text-based, persistent browser-based strategy game (PBBG) in a fantasy war setting

Note: OpenDominion is still in development. Some features of the game have not been implemented yet. Introduction OpenDominion is a free and open-sour

null 180 Dec 28, 2022
Small convention based CQRS library for PHP

LiteCQRS for PHP Small naming-convention based CQRS library for PHP (loosely based on LiteCQRS for C#) that relies on the MessageBus, Command, EventSo

Benjamin Eberlei 560 Nov 20, 2022