PHPackages                             thesnackalicious/combinewords - 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. thesnackalicious/combinewords

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

thesnackalicious/combinewords
=============================

Combine words from word lists into strings in Laravel 5.

v1.1(10y ago)1227MITPHPPHP &gt;=5.4.0

Since Jun 20Pushed 10y agoCompare

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

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

combinewords
============

[](#combinewords)

> Combine words from word lists into strings in Laravel 5.

combinewords is a package for Laravel 5 that provides functionality to combine random words selected from loaded lists to generate a string.

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

[](#installation)

Add `thesnackalicious/combinewords` to your `composer.json` file:

```
"require": {
  "thesnackalicious/combinewords": "1.*"
}

```

Use `composer` to install this package.

```
$ composer update

```

### Register the Service Provider and Facade

[](#register-the-service-provider-and-facade)

After updating composer add the service provider to the `providers` array in your `config/app.php` file:

```
TheSnackalicious\CombineWords\Providers\CombineWordsServiceProvider::class

```

Add the facade to the `aliases` array in your `config/app.php` file:

```
'CombineWords' => TheSnackalicious\CombineWords\Facades\CombineWords::class

```

### Publish the configuration file

[](#publish-the-configuration-file)

If you want to use an alternative configuration, you can publish the `combinewords.php` configuration file:

```
$ php artisan vendor:publish

```

How it works
------------

[](#how-it-works)

combinewords generates strings by choosing random words based on the supplied format string. For each word holder in the format string, combinewords will choose a random word to replace it from the corresponding .json file. For example:

```
$ php artisan tinker
>>> CombineWords::make('{color}{noun}');
=> "blackwood"

```

In this example combinewords chooses one random word from the `color.json` file and one random word from the `noun.json` file to create the `blackwood` string.

combinewords will look for word list files in the directory specified by the value in the `combinewords.directory` configuration key. combinewords comes with two word lists included: `color.json` and `noun.json`.

### Adding Requirements

[](#adding-requirements)

combinewords allows you to specify requirements that the generated string must meet:

```
$ php artisan tinker
>>> CombineWords::requirement(new MinimumLengthRequirement(5))->make('{color}{noun}');
=> "orangefather"
>>> CombineWords::requirements([new MaximumLengthRequirement(10), function($s) { return strpos($s, 'pink') === 0; }])->make('{color}{noun}');
=> "pinktree"

```

The maximum number of attempts that combinewords will perform is specified by the value in the `combinewords.max_attempts` configuration key. This value can also be passed in as the second parameter to the `make` function.

Note that the requirements stored on the generator are cleared after every call to the `make` function. If you want to preserve the requirements for the next `make` function call you should pass `true` as the third parameter of the `make` function.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

2

Last Release

3985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5ac68d5e9a1660d566d3301a07252733d6e6892c54689110b382d2619c282b0?d=identicon)[thesnackalicious](/maintainers/thesnackalicious)

---

Top Contributors

[![jamesbrauman](https://avatars.githubusercontent.com/u/1854936?v=4)](https://github.com/jamesbrauman "jamesbrauman (6 commits)")

---

Tags

laravelstringmanipulationwords

### Embed Badge

![Health badge](/badges/thesnackalicious-combinewords/health.svg)

```
[![Health](https://phpackages.com/badges/thesnackalicious-combinewords/health.svg)](https://phpackages.com/packages/thesnackalicious-combinewords)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)[hallindavid/manny

a package of manipulators that hopefully come in useful for those of us who always forget regex when we need it (manny is short for manipulation)

38103.3k2](/packages/hallindavid-manny)[jasonlam604/stringizer

Stringizer is a PHP string manipulation library with support for method chaining and multibyte handling

35110.5k1](/packages/jasonlam604-stringizer)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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