PHPackages                             danpalmieri/laravel-slug-token - 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. danpalmieri/laravel-slug-token

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

danpalmieri/laravel-slug-token
==============================

Auto generate a unique and configurable token during the model creation.

v1.2(2y ago)011MITPHPPHP ^8.2

Since Apr 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/danpalmieri/laravel-slug-token)[ Packagist](https://packagist.org/packages/danpalmieri/laravel-slug-token)[ Docs](https://github.com/danpalmieri/laravel-slug-token)[ GitHub Sponsors](https://github.com/DanPalmieri)[ RSS](/packages/danpalmieri-laravel-slug-token/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (12)Versions (4)Used By (0)

Laravel Slug Token
==================

[](#laravel-slug-token)

[![Latest Version on Packagist](https://camo.githubusercontent.com/71cb5a473cf0bbaae00f0b4744d20bc497adca5eee9fd41203c73967f873252d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616e70616c6d696572692f6c61726176656c2d736c75672d746f6b656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/danpalmieri/laravel-slug-token)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f996089d6e80b580e6bc8b4759946f939f71504263c36dda08b78196638db9ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64616e70616c6d696572692f6c61726176656c2d736c75672d746f6b656e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/danpalmieri/laravel-slug-token/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)

Auto generate a unique and configurable token during the model creation.

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

[](#installation)

You can install the package via composer:

```
composer require danpalmieri/laravel-slug-token
```

You can publish the config file with:

```
php artisan vendor:publish --tag="slug-token-config"
```

This is the contents of the published config file:

```
return [
    /**
     * The length of the slug.
     */
    'length' => 5,

    /**
     * The characters to randomize for the slug.
     * Is recommended to not include characters that can be easily confused like 1 and l, 0 and o, etc.
     */
    'characters' => '23456789abcdefghjmnpqrstuvxzwyk',

    /**
     * The column name to use for the slug.
     */
    'column' => 'slug',
];
```

Usage
-----

[](#usage)

Just add the `HasSlugToken` trait to your model.

```
use DanPalmieri\LaravelSlugToken\Traits\HasSlugToken;

class YourModel extends Model
{
    use HasSlugToken; // Add this line
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Daniel Palmieri](https://github.com/danpalmieri)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

3

Last Release

806d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1392562?v=4)[Daniel Palmieri](/maintainers/danpalmieri)[@danpalmieri](https://github.com/danpalmieri)

---

Top Contributors

[![danpalmieri](https://avatars.githubusercontent.com/u/1392562?v=4)](https://github.com/danpalmieri "danpalmieri (14 commits)")

---

Tags

laraveldanpalmierilaravel-slug-token

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/danpalmieri-laravel-slug-token/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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