PHPackages                             taylornetwork/username-suggester - 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. taylornetwork/username-suggester

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

taylornetwork/username-suggester
================================

A package to suggest usernames based on taylornetwork/laravel-username-generator

0.1.1(3y ago)217.2k↑74.3%MITPHPPHP ^8.0|^8.1

Since Sep 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/taylornetwork/username-suggester)[ Packagist](https://packagist.org/packages/taylornetwork/username-suggester)[ RSS](/packages/taylornetwork-username-suggester/feed)WikiDiscussions master Synced 1mo ago

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

Username Suggester
==================

[](#username-suggester)

A package to suggest usernames from [taylornetwork/laravel-username-generator](https://github.com/taylornetwork/laravel-username-generator)

This would be useful if you want to show your users a list of suggested usernames based on their entry if their selection is unavailable.

Install
-------

[](#install)

Via composer

```
$ composer require taylornetwork/username-suggester
```

Publish Config
--------------

[](#publish-config)

This will publish to `config/username_suggester.php`

```
$ php artisan vendor:publish --provider="TaylorNetwork\UsernameSuggester\UsernameSuggesterProvider"
```

Set Up
------

[](#set-up)

You will need to follow the [quickstart guide](https://github.com/taylornetwork/laravel-username-generator#quickstart)for [taylornetwork/laravel-username-generator](https://github.com/taylornetwork/laravel-username-generator).

At minimum your `User` model needs to use the `TaylorNetwork\UsernameGenerator\FindSimilarUsernames` (see [set up](https://github.com/taylornetwork/laravel-username-generator#set-up))

Defaults
--------

[](#defaults)

The suggester will generate `3` unique usernames based on the given name. It will use the `increment` driver which will use the `TaylorNetwork\UsernameGenerator\Generator` class to convert the name to a username and then add incrementing numbers on the end to make them unique.

If no name is entered it will generate random usernames, same as `TaylorNetwork\UsernameGenerator\Generator`

Usage
-----

[](#usage)

### Available Methods

[](#available-methods)

#### suggest

[](#suggest)

The `suggest()` method accepts an optional parameter of the name to suggest usernames for.

```
$suggester = new \TaylorNetwork\UsernameSuggester\Suggester();

$suggester->suggest(); // Returns a collection of random unique usernames

$suggester->suggest('test user'); // Returns a collection of unique usernames based on the name 'test user'
```

#### setDriver

[](#setdriver)

This will allow you to set a different driver than the default.

```
$suggester->setDriver('random');
```

This method returns an instance of the `Suggester` class, so you're able to chain methods.

#### setAmount

[](#setamount)

This will allow you to set a different amount of suggestions than the default.

```
$suggester->setAmount(10);
```

This method returns an instance of the `Suggester` class, so you're able to chain methods.

#### setGeneratorConfig

[](#setgeneratorconfig)

This will allow you to override the `TaylorNetwork\UsernameGenerator\Generator` config.

```
$suggester->setGeneratorConfig([
    'separator' => '*',
]);
```

Same as `setAmount` and `setDriver` this method also returns the `Suggester` instance.

### Example

[](#example)

#### Basic with Random Usernames

[](#basic-with-random-usernames)

```
$suggester->suggest();
```

#### Basic with Entered Name

[](#basic-with-entered-name)

```
$suggester->suggest('test user');
```

#### Different Driver and Amount

[](#different-driver-and-amount)

```
$suggester->setDriver('random')->setAmount(5)->suggest('test user');
```

This will use the `Random` driver to append random numbers after the username and generate 5 usernames.

#### Using the Facade

[](#using-the-facade)

A `UsernameSuggester` facade is included so all the methods can be accessed that way.

```
UsernameSuggester::suggest();
```

Custom Drivers
--------------

[](#custom-drivers)

You can create any custom drivers by extending the `TaylorNetwork\UsernameSuggester\Drivers\BaseDriver` class.

```
namespace App\SuggesterDrivers;

use TaylorNetwork\UsernameSuggester\Drivers\BaseDriver;

class CustomDriver extends BaseDriver
{
    public function makeUnique(string $username): string
    {
        return $username;
    }
}
```

The only requirement is that you implement the `makeUnique` method to make the username unique in some way.

You'll also need to register the driver in `app/username_suggester.php`

```
'drivers' => [
    'custom' => CustomDriver::class,
    // ...
],
```

You can access it using the key you set.

```
UsernameSuggester::setDriver('custom')->suggest();
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~273 days

Total

2

Last Release

1441d ago

PHP version history (2 changes)0.1PHP ^8.0

0.1.1PHP ^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/83340094473f0bf5b2cf062bf394df221a52a30aa0e21cd0a77302977d6393ce?d=identicon)[samueljtaylor](/maintainers/samueljtaylor)

---

Top Contributors

[![samyrataylor](https://avatars.githubusercontent.com/u/15961687?v=4)](https://github.com/samyrataylor "samyrataylor (15 commits)")

---

Tags

laravelphp

### Embed Badge

![Health badge](/badges/taylornetwork-username-suggester/health.svg)

```
[![Health](https://phpackages.com/badges/taylornetwork-username-suggester/health.svg)](https://phpackages.com/packages/taylornetwork-username-suggester)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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