PHPackages                             matteoggl/linnaeus - 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. [Database &amp; ORM](/categories/database)
4. /
5. matteoggl/linnaeus

ActiveLibrary[Database &amp; ORM](/categories/database)

matteoggl/linnaeus
==================

A package to create readable, random slugs for Eloquent models from animal names and adjectives.

1.1.0(5y ago)226.7k↑14.3%MITPHPPHP &gt;=7.4

Since Aug 27Pushed 5y ago2 watchersCompare

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

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

Linnaeus
========

[](#linnaeus)

[![GitHub](https://camo.githubusercontent.com/2fa621b8e1cfccb8fdd936fb2aea942db1c50d2adfec3463790415023cc821a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d617474656f67676c2f6c696e6e61657573)](https://camo.githubusercontent.com/2fa621b8e1cfccb8fdd936fb2aea942db1c50d2adfec3463790415023cc821a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d617474656f67676c2f6c696e6e61657573)[![Packagist Downloads](https://camo.githubusercontent.com/41d08009c9b1f5a1976bd37180ea1651c3e3920418c9f07588051e471d3acda6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d617474656f67676c2f6c696e6e61657573)](https://camo.githubusercontent.com/41d08009c9b1f5a1976bd37180ea1651c3e3920418c9f07588051e471d3acda6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d617474656f67676c2f6c696e6e61657573)

A package to create readable, random slugs for Eloquent models from animal names and adjectives.

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

[](#installation)

Just require the package through composer:

```
composer require matteoggl/linnaeus
```

Usage
-----

[](#usage)

Add the `HasSlug` trait on your Eloquent model and insert a column on it's table named `slug`, of type `string` with a `unique` modifier.

```
$table->string('slug')->unique();
```

By default, a new unique string taken from a combination of 900~ adjectives, 100+ colors and 250~ animals is assigned to the model when created with the following structure: *adjective-adjective-animal*.

When updated, the slug will not be changed and if soft-deletable, the model's slug will be considered used.

The slugs are used with Laravel's implicit route model binding. For example, this code:

```
Route::get('/users/{user}', function (App\User $user) {
    return $user->email;
});
```

will use Linnaeus' slugs (e.g. `/users/moldy-encouraging-turtle`).

Configuration
-------------

[](#configuration)

To publish the configuration file, run the following command:

```
php artisan vendor:publish --provider="MatteoGgl\Linnaeus\LinnaeusServiceProvider" --tag="config"
```

The `linnaeus.php` configuration file will appear in your `config/` directory.

Per-model configuration
-----------------------

[](#per-model-configuration)

Some options can be overridden by updating them inside the model constructor, using a fluent API; here's an example using all the available ones:

```
public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
        $this->linnaeus = LinnaeusOptions::create()
            ->withKey('linnaeus_slug')
            ->withStructure(['color', 'animal'])
            ->withSeparator('_')
            ->generatesOnUpdate()
            ->withInvalidAnimals(['aardvark'])
            ->withInvalidAdjectives(['zany'])
            ->withInvalidColors(['blue']);
    }
```

FAQ
---

[](#faq)

**Q: What's up with the name?**

A: Take a look at Carl Linnaeus on [Wikipedia](https://en.wikipedia.org/wiki/Carl_Linnaeus)

**Q: Can this package do *feature*?**

A: I created this package out of a need for a personal project. If you have some suggestions feel free to open an issue or a PR! Also, this package is heavily inspired from [spatie/laravel-sluggable](https://github.com/spatie/laravel-sluggable); maybe the features you are looking for are there.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

2090d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16136669?v=4)[Matteo Guglielmetti](/maintainers/matteoggl)[@MatteoGgl](https://github.com/MatteoGgl)

---

Tags

eloquentlaravelphpslugsluglaraveleloquent

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matteoggl-linnaeus/health.svg)

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

###  Alternatives

[cviebrock/eloquent-sluggable

Easy creation of slugs for your Eloquent models in Laravel

4.0k13.6M253](/packages/cviebrock-eloquent-sluggable)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[pishran/laravel-persian-slug

Creates Persian slugs for Eloquent models.

5527.6k1](/packages/pishran-laravel-persian-slug)[phaza/single-table-inheritance

Single Table Inheritance Trait

1515.8k](/packages/phaza-single-table-inheritance)

PHPackages © 2026

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