PHPackages                             black-sheep-tech/laravel-dice-bear - 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. [API Development](/categories/api)
4. /
5. black-sheep-tech/laravel-dice-bear

ActiveLibrary[API Development](/categories/api)

black-sheep-tech/laravel-dice-bear
==================================

A simple service provider/wrapper for the DiceBear Avatars API (https://dicebear.com/).

v1.0.0(1y ago)1101↓33.3%[1 issues](https://github.com/BlackSheepTech/laravel-dice-bear/issues)MITPHPPHP ^8.0

Since Sep 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/BlackSheepTech/laravel-dice-bear)[ Packagist](https://packagist.org/packages/black-sheep-tech/laravel-dice-bear)[ RSS](/packages/black-sheep-tech-laravel-dice-bear/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

 [ ![BlackSheepTech UiAvatars](https://avatars.githubusercontent.com/u/85756821?s=400&u=14843f72938dc40cbd14400f5b3daad45f054f43&v=4) ](https://github.com/BlackSheepTech/laravel-dice-bear)

 [![Current Version](https://camo.githubusercontent.com/f5b05326e79b82b0141b97d0530fd8f5b596731d815bbcafdcc726e00deb017b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b2d73686565702d746563682f6c61726176656c2d646963652d62656172)](https://packagist.org/packages/black-sheep-tech/laravel-dice-bear) [![Total Downloads](https://camo.githubusercontent.com/6fb3e4e72358a5ed8f29c0e653574098e7358548e484a59b8e6c6d3b775b68e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c61636b2d73686565702d746563682f6c61726176656c2d646963652d62656172)](https://packagist.org/packages/black-sheep-tech/laravel-dice-bear) [![License](https://camo.githubusercontent.com/41441905017ed4bebf3042aef53257e11b32678a17fe8d3bf69a5c52a86d9ed2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f426c61636b5368656570546563682f6c61726176656c2d646963652d62656172)](https://packagist.org/packages/black-sheep-tech/laravel-dice-bear) [![Stars](https://camo.githubusercontent.com/ba0128aad6a0026110887332c3042656e5944169ad81a1dd371ce218260c08c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f426c61636b5368656570546563682f6c61726176656c2d646963652d62656172)](https://packagist.org/packages/black-sheep-tech/laravel-dice-bear)

Laravel DiceBear is a PHP library for Laravel used to generate avatar using the DiceBear API (). This package provides a simple, fluent interface for customizing avatar parameters and generating the corresponding URL. It also allows downloading and saving the avatars locally. Support for self-hosted DiceBear API is also available.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require black-sheep-tech/laravel-dice-bear
```

Usage
-----

[](#usage)

### Basic Usage (All Styles)

[](#basic-usage-all-styles)

```
use BlackSheepTech\DiceBear\DiceBear;

// Generates a random avatar using the 'botttsNeutral' style with a size of 128 pixels and 'Avesome Avatar Seeder' as seed.

$avatarUrl = DiceBear::style('botttsNeutral')->seed('Avesome Avatar Seeder')->size(128)->getUrl();

// Alternatively, you can use the following shorthand method:

$avatarUrl = DiceBear::botttsNeutral()->seed('Avesome Avatar Seeder')->size(128)->getUrl();
```

### Download Avatar

[](#download-avatar)

To download the avatar directly:

```
// Prompts a download of the avatar to a file named 'john_doe_avatar.png', by default, if a file name is not provided, a random name will be generated.
use BlackSheepTech\DiceBear\DiceBear;

DiceBear::botttsNeutral()->seed('John Doe')->size(128)->download();
```

### Save Avatar Directly to Disk

[](#save-avatar-directly-to-disk)

To save the avatar to a specific location:

```
use BlackSheepTech\DiceBear\DiceBear;

// Saves the avatar to 'avatars/john_doe_avatar.png' by default.
$avatarPath = DiceBear::botttsNeutral()->seed('John Doe')->size(128)->saveTo('avatars', 'john_doe_avatar');

// You can provided the disk to be used as the third parameter, by default, the application's default disk will be used.
$avatarPath = DiceBear::botttsNeutral()->seed('John Doe')->size(128)->saveTo('avatars', 'john_doe_avatar', 'public');
```

### Supported Styles

[](#supported-styles)

Currently, the following DiceBear styles are supported:

- [botttsNeutral](https://www.dicebear.com/styles/bottts-neutral/)
- [adventurerNeutral](https://www.dicebear.com/styles/adventurer-neutral/)
- [initials](https://www.dicebear.com/styles/initials/)

### Style Specific Options

[](#style-specific-options)

Most styles have options specific to them.

- **BotttsNeutral** - [Detailed Options](botttsNeutralOptions.md)
    - Eyes
    - Mouth
- **AdventurerNeutral** - [Detailed Options](adventurerNeutralOptions.md)
    - Eyebrows
    - Eyes;
    - Mouth
    - Glasses
    - Glasses Probability
- **Initials** - Does not support any additional options

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel framework version 9.0 or higher

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request on GitHub.

Credits
-------

[](#credits)

- [Israel Pinheiro](https://github.com/IsraelPinheiro)
- [All Contributors](https://github.com/BlackSheepTech/laravel-dice-bear/graphs/contributors)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

623d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f1bff44e900ea9254da31678986ec28a5894f29712b9af699cc52a4ddb77d32?d=identicon)[IsraelPinheiro](/maintainers/IsraelPinheiro)

---

Top Contributors

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

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/black-sheep-tech-laravel-dice-bear/health.svg)

```
[![Health](https://phpackages.com/badges/black-sheep-tech-laravel-dice-bear/health.svg)](https://phpackages.com/packages/black-sheep-tech-laravel-dice-bear)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sburina/laravel-whmcs-up

WHMCS API client and user provider for Laravel

271.3k](/packages/sburina-laravel-whmcs-up)

PHPackages © 2026

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