PHPackages                             codinglabsau/laravel-sluggable - 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. codinglabsau/laravel-sluggable

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

codinglabsau/laravel-sluggable
==============================

Generate slugs when saving Eloquent models

v1.1.1(2y ago)29.0k↓81.8%MITPHPPHP ^8.1

Since Sep 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/codinglabsau/laravel-sluggable)[ Packagist](https://packagist.org/packages/codinglabsau/laravel-sluggable)[ Docs](https://github.com/codinglabsau/laravel-sluggable)[ RSS](/packages/codinglabsau-laravel-sluggable/feed)WikiDiscussions main Synced 2d ago

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

Laravel Sluggable
=================

[](#laravel-sluggable)

[![Build Status](https://camo.githubusercontent.com/158f15a4505bcd35a5986d6d6f113f3b3e6c88b588dcec0e84b72ab51a215083/68747470733a2f2f7472617669732d63692e6f72672f636f64696e676c61627361752f6c61726176656c2d736c75676761626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/codinglabsau/laravel-sluggable)[![Latest Stable Version](https://camo.githubusercontent.com/d81da409527e635782e7d5da7475a2be39a12f25981d4f46c06d7dc513455ba2/68747470733a2f2f706f7365722e707567782e6f72672f636f64696e676c61627361752f6c61726176656c2d736c75676761626c652f762f737461626c65)](https://packagist.org/packages/codinglabsau/laravel-sluggable)[![Total Downloads](https://camo.githubusercontent.com/ca6c20a9d609c2fc74f7958d043cea136fb34b2d187989a35b09baea85f0ca2c/68747470733a2f2f706f7365722e707567782e6f72672f636f64696e676c61627361752f6c61726176656c2d736c75676761626c652f646f776e6c6f616473)](https://packagist.org/packages/codinglabsau/laravel-sluggable)[![License](https://camo.githubusercontent.com/eb3b14cc4ff3e4ba81bbae1e9900748278834a64423d5c2461d8592d2a1b85b0/68747470733a2f2f706f7365722e707567782e6f72672f636f64696e676c61627361752f6c61726176656c2d736c75676761626c652f6c6963656e7365)](https://packagist.org/packages/codinglabsau/laravel-sluggable)

A super simple, opinionated trait to add slugs to models in Laravel.

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

[](#installation)

Via Composer

```
$ composer require codinglabsau/laravel-sluggable
```

Usage
-----

[](#usage)

### Add `name` and `slug` columns to your model

[](#add-name-and-slug-columns-to-your-model)

This package watches for changes on the `name` attribute, and automatically slugifies the slug column.

### Add the trait

[](#add-the-trait)

Add the `Sluggable` trait to your user model:

```
use Codinglabs\Sluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    use Sluggable;
}
```

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

[](#contributing)

Feel free to create a PR with tests!

Security
--------

[](#security)

If you discover any security related issues, create an issue on GitHub.

Credits
-------

[](#credits)

- [Steve Thomas](https://github.com/stevethomas)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](LICENSE.md) for more information.

About Coding Labs
-----------------

[](#about-coding-labs)

Coding Labs is a web app development agency based on the Gold Coast, Australia. See our open source projects [on our website](https://codinglabs.com.au/open-source).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~210 days

Recently: every ~305 days

Total

7

Last Release

845d ago

PHP version history (3 changes)v1.0.0PHP ^7.2.5

v1.0.3PHP ^7.2.5|^8.0

v1.1.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1127412?v=4)[Steve Thomas](/maintainers/stevethomas)[@stevethomas](https://github.com/stevethomas)

---

Top Contributors

[![stevethomas](https://avatars.githubusercontent.com/u/1127412?v=4)](https://github.com/stevethomas "stevethomas (8 commits)")[![austincarpenter](https://avatars.githubusercontent.com/u/3736774?v=4)](https://github.com/austincarpenter "austincarpenter (1 commits)")

---

Tags

eloquentlaravelsluglaravel-sluggableCoding Labs

### Embed Badge

![Health badge](/badges/codinglabsau-laravel-sluggable/health.svg)

```
[![Health](https://phpackages.com/badges/codinglabsau-laravel-sluggable/health.svg)](https://phpackages.com/packages/codinglabsau-laravel-sluggable)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.6k12.9M311](/packages/spatie-laravel-sluggable)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

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