PHPackages                             kduma/eloquent-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. kduma/eloquent-sluggable

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

kduma/eloquent-sluggable
========================

Eases using and generating slugs Laravel Eloquent models.

v3.0.0(2mo ago)3847MITPHPPHP ^8.3CI failing

Since Jan 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/kduma-OSS/LV-eloquent-sluggable)[ Packagist](https://packagist.org/packages/kduma/eloquent-sluggable)[ RSS](/packages/kduma-eloquent-sluggable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (7)Versions (15)Used By (0)

Eloquent Sluggable
==================

[](#eloquent-sluggable)

[![Latest Stable Version](https://camo.githubusercontent.com/c6fa472cde348fde43babc81f0419bf2ffa23a6a3e4991bd1f04b69629979813/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d736c75676761626c652f762f737461626c652e737667)](https://packagist.org/packages/kduma/eloquent-sluggable)[![Total Downloads](https://camo.githubusercontent.com/56433a3caf034c7a363a40a7803af73e2b298c51642a55fc508d64f31b3784f8/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d736c75676761626c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/kduma/eloquent-sluggable)[![License](https://camo.githubusercontent.com/fa017a2bf7eeb554081861000cf14ba5bb83803c1192755d4a7f4d303a873198/68747470733a2f2f706f7365722e707567782e6f72672f6b64756d612f656c6f7175656e742d736c75676761626c652f6c6963656e73652e737667)](https://packagist.org/packages/kduma/eloquent-sluggable)

Eloquent trait for automatically generating unique slugs for Laravel models.

Full documentation: [opensource.duma.sh/libraries/php/eloquent-sluggable](https://opensource.duma.sh/libraries/php/eloquent-sluggable)

Requirements
------------

[](#requirements)

- PHP `^8.3`
- Laravel `^13.0`

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

[](#installation)

```
composer require kduma/eloquent-sluggable
```

Usage
-----

[](#usage)

```
use KDuma\Eloquent\Sluggable;
use KDuma\Eloquent\Attributes\HasSlug;

#[HasSlug(from: 'title', field: 'slug')]
class Post extends Model
{
    use Sluggable;
}
```

Add a `slug` column to your migration:

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

Slug is auto-generated on create. Find by slug with `Post::whereSlug($slug)`.

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance83

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

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

Recently: every ~280 days

Total

13

Last Release

86d ago

Major Versions

v1.1.0 → v2.02017-05-21

v2.4.0 → v3.0.02026-04-08

PHP version history (3 changes)v1.0.0PHP &gt;=5.4.0

v2.0.3PHP &gt;=7.4

v3.0.0PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![kduma](https://avatars.githubusercontent.com/u/1062582?v=4)](https://github.com/kduma "kduma (53 commits)")

---

Tags

laravelphpsluglaraveleloquent

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kduma-eloquent-sluggable/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.6k12.9M311](/packages/spatie-laravel-sluggable)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[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)

PHPackages © 2026

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