PHPackages                             dudic/laravel-slug-generator - 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. dudic/laravel-slug-generator

ActiveLibrary

dudic/laravel-slug-generator
============================

Description

1.0.1(3y ago)04MITPHPPHP &gt;=8.0

Since Nov 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/LazarDudic/laravel-slug-generator)[ Packagist](https://packagist.org/packages/dudic/laravel-slug-generator)[ Docs](https://github.com/LazarDudic/laravel-slug-generator)[ RSS](/packages/dudic-laravel-slug-generator/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Slug Generator
======================

[](#laravel-slug-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/29eb4a8a213be8681e45ba0682ed1887034dc2bcd36cdda29040b11e439d1c92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64756469632f6c61726176656c2d736c75672d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dudic/laravel-slug-generator)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://github.com/LazarDudic/laravel-slug-generator/actions/workflows/test.yml/badge.svg)](https://github.com/LazarDudic/laravel-slug-generator/actions/workflows/test.yml)[![Total Downloads](https://camo.githubusercontent.com/89db73849f151b936d121e41183202787c90f6cdb7b2e443ade2c45a462f1469/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64756469632f6c61726176656c2d736c75672d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dudic/laravel-slug-generator)

This package was created to generate slug on my personal projects, it is straightforward to use, you just need to install it, add trait to the model, and set the $slugConfiguration property in your model.

> **NOTE:** Tested for 9.\* and 8.\* version of Laravel.

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

[](#installation)

You can install the package via composer:

```
composer require dudic/laravel-slug-generator
```

Usage
-----

[](#usage)

```
use Dudic\Sluggable\SlugGenerator;

class User extends Authenticatable
{
    use SlugGenerator; // add

    protected $slugConfiguration = [
        'create_from' => ['first_name', 'last_name'], // ['required', 'array']
        'slug_field' => 'slug', // ['required', 'string']
        'unique' => true, // ['optional', 'bool'] default true, if slug exist unique will add at end '-1' or any next number which will make unique slug
        'on_create' => true, // ['optional', 'bool'] default true
        'on_update' => true, // ['optional', 'bool'] default true
        'separator' => '-', // ['optional', 'string'] default "-"
        'max_length' => 250, // ['optional', 'int', 'min:1'] default 250, if not unique can exceed 250
    ];
}

$user = User::create([
    'first_name' => 'John',
    'last_name' => 'Doe'
]);
echo $user->slug; // john-doe
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

1258d ago

### Community

Maintainers

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

---

Top Contributors

[![LazarDudic](https://avatars.githubusercontent.com/u/67436423?v=4)](https://github.com/LazarDudic "LazarDudic (5 commits)")

---

Tags

laravel\_slug\_generatordudic

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dudic-laravel-slug-generator/health.svg)

```
[![Health](https://phpackages.com/badges/dudic-laravel-slug-generator/health.svg)](https://phpackages.com/packages/dudic-laravel-slug-generator)
```

PHPackages © 2026

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