PHPackages                             hansdeboeck/laravel-username-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hansdeboeck/laravel-username-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hansdeboeck/laravel-username-generator
======================================

Generate a random, kid-safe username.

v1.0.0(4mo ago)0861MITPHPPHP ^8.4

Since Jan 10Pushed 4mo agoCompare

[ Source](https://github.com/hansdeboeck/laravel-username-generator-dutch)[ Packagist](https://packagist.org/packages/hansdeboeck/laravel-username-generator)[ Docs](https://github.com/hansdeboeck/laravel-username-generator-dutch)[ GitHub Sponsors](https://github.com/HansDeBoeck)[ RSS](/packages/hansdeboeck-laravel-username-generator/feed)WikiDiscussions main Synced 1mo ago

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

Generate a random, kid-safe username.
=====================================

[](#generate-a-random-kid-safe-username)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3d6e627b9489c39139b067125e837e28d97cfb43ed2a5ec3f3e974dd5a68e94d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f48616e734465426f65636b2f6c61726176656c2d757365726e616d652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/HansDeBoeck/laravel-username-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6859515ed2d613748e2d37cebdd368951e7a645ee81a49a62d5295772ff63d25/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f48616e734465426f65636b2f6c61726176656c2d757365726e616d652d67656e657261746f722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/HansDeBoeck/laravel-username-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e702a7d2635fb13c001a6b60eacd8937cf42e558f7c67e4de2116fd633cc266c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f48616e734465426f65636b2f6c61726176656c2d757365726e616d652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/HansDeBoeck/laravel-username-generator)

Generate a username with flexible configuration options. For now the nouns are animal names.

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

[](#installation)

You can install the package via composer:

```
composer require HansDeBoeck/laravel-username-generator
```

You can optionally publish the config file with:

```
php artisan vendor:publish --tag="laravel-username-generator-config"
```

By default, it will generate a username studly case with 1 adjective, 1 noun and no numeric prefix. You can modify the config file with your preferred numbers:

```
return [
    'adjectives' => 2,
    'nouns' => 1,
    'digits' => 2,
    // The casing leverages Laravel's string helper functions:
    // "lower", "upper", "studly", "kebab", "camel", "snake", "slug"
    'casing' => 'slug',
];
```

Usage
-----

[](#usage)

You can leverage your config setup to generate a username based on those options. Using the above configuration as an example, this would generate a username as `adjective-adjective-noun-##`:

```
use HansDeBoeck\UsernameGenerator\Username;

$username = Username::make();
// grave-tame-tiger-60
```

Or, if you want to configure your username on the fly, you can use a fluent API to build your username:

```
use HansDeBoeck\UsernameGenerator\Username;

$username = (new Username)
    ->withAdjectiveCount(2)
    ->withNounCount(2)
    ->withDigitCount(4)
    ->withCasing('snake')
    ->generate();
// gentle_wan_chimpanzee_sandpiper8828
```

Command
-------

[](#command)

This also comes with a `make:username` command to generate a username from the command line:

```
# This will use what's in your configuration file
php artisan make:username
# personal-unrealistic-eland-30
```

You can pass in a number of options to change how the username is generated:

```
php artisan make:username --count 2 --digits 8 --casing studly
# OrdinaryHerring02683641
# WittyGoat89531555
```

```
Options:
  -c, --casing[=CASING]          The casing to use: "lower", "upper", "studly", "kebab", "camel", "snake", or "slug".
  -d, --digits[=DIGITS]          The number of digits to use for a prefix.
  -a, --adjectives[=ADJECTIVES]  The number of adjectives to use.
  -N, --nouns[=NOUNS]            The number of nouns to use.
  -C, --count[=COUNT]            The number of usernames to generate. [default: "1"]

```

Testing
-------

[](#testing)

```
composer test
composer analyse
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Want to add a noun or adjective? Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance76

Regular maintenance activity

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

128d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dc1f3a840d7cb68140b6c2d5a1ffd06dc2bcfd223c3473f56d7d8559d842c90?d=identicon)[hansdeboeck](/maintainers/hansdeboeck)

---

Top Contributors

[![grantholle](https://avatars.githubusercontent.com/u/1189456?v=4)](https://github.com/grantholle "grantholle (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (14 commits)")[![hansdeboeck](https://avatars.githubusercontent.com/u/3226092?v=4)](https://github.com/hansdeboeck "hansdeboeck (4 commits)")

---

Tags

usernameusername generator

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/hansdeboeck-laravel-username-generator/health.svg)

```
[![Health](https://phpackages.com/badges/hansdeboeck-laravel-username-generator/health.svg)](https://phpackages.com/packages/hansdeboeck-laravel-username-generator)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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