PHPackages                             grantholle/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. grantholle/laravel-username-generator

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

grantholle/laravel-username-generator
=====================================

Generate a random, kid-safe username.

2.1.0(2y ago)362.0k↑51.4%2[2 PRs](https://github.com/grantholle/laravel-username-generator/pulls)MITPHPPHP ^8.1CI passing

Since Jan 19Pushed 4mo ago1 watchersCompare

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

READMEChangelogDependencies (8)Versions (6)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/0d94d9823778270c58070bf25f22df2da12b817dcd2d1c0654af6829e4697a31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772616e74686f6c6c652f6c61726176656c2d757365726e616d652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grantholle/laravel-username-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ac9af1a30dd14b91d7b1c999269d0ce5a152784c0a756f98a6026fd218e484bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6772616e74686f6c6c652f6c61726176656c2d757365726e616d652d67656e657261746f722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/grantholle/laravel-username-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/094c46bc43e4e0dbeb7071c423ba060a013dc80d70e4e3de7ee1248099a9f61a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772616e74686f6c6c652f6c61726176656c2d757365726e616d652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grantholle/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 grantholle/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 GrantHolle\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 GrantHolle\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

45

—

FairBetter than 93% of packages

Maintenance52

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~266 days

Total

4

Last Release

781d ago

Major Versions

1.1.0 → 2.0.02023-06-27

PHP version history (2 changes)1.0.0PHP ^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/57ed974235b4a23e6aaf9d9039bff2b0d1268edc0e44ebab6e60e4bf1e6eb144?d=identicon)[grantholle](/maintainers/grantholle)

---

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] (16 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")

---

Tags

usernameusername generator

###  Code Quality

TestsPest

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/grantholle-laravel-username-generator/health.svg)](https://phpackages.com/packages/grantholle-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)
