PHPackages                             cserobiul/slug - 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. cserobiul/slug

ActiveLibrary

cserobiul/slug
==============

Simple and Easy Laravel Unicode Supported Unique Slug Generator Package

v1.1.3(3y ago)367MITPHPPHP &gt;=7.4

Since Dec 2Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (5)Used By (0)

Laravel Unicode Supported Unique Slug Generator Package
=======================================================

[](#laravel-unicode-supported-unique-slug-generator-package)

Very Simple and Easy Package

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

[](#installation)

```
composer require cserobiul/slug
```

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

[](#configuration)

```
No Configuration Need
```

Use from Controller
-------------------

[](#use-from-controller)

Import Slug class

```
use Cserobiul\Slug\Slug;
```

Publish configuration
---------------------

[](#publish-configuration)

```
php artisan vendor:publish cserobiul/slug
```

### Example #01- Blog unique slug from 'Blog Title'

[](#example-01--blog-unique-slug-from-blog-title)

Suppose, we already have `blogs` table and added an `slug` column which is unique. Now, if we passed `title` and generate unique `slug` from that.

```
// 1st time create slug
Slug::make('blogs', 'Blog Title', 'slug');
// Output: blog-title

// 2nd time create slug
Slug::make('blogs', 'Blog Title', 'slug');
// Output: blog-title-1

// 3rd time create slug
Slug::make('blogs', 'Blog Title', 'slug');
// Output: blog-title-2

// 4th time create slug
Slug::make('blogs', 'Blog Title', 'slug');
// Output: blog-title-3
```

### Example #02- Blog 'Unicode Title' to unique slug

[](#example-02--blog-unicode-title-to-unique-slug)

```
// 1st time create slug
Slug::make('blogs', 'প্রেমের নাম বেদনা', 'slug');
// Output: প্রেমের-নাম-বেদনা

// 2nd time create slug
Slug::make('blogs', 'প্রেমের নাম বেদনা', 'slug');
// Output: প্রেমের-নাম-বেদনা-1

// 3rd time create slug
Slug::make('blogs', 'প্রেমের নাম বেদনা', 'slug');
// Output: প্রেমের-নাম-বেদনা-2

// 4th time create slug
Slug::make('blogs', 'প্রেমের নাম বেদনা', 'slug');
// Output: প্রেমের-নাম-বেদনা-3
```

### Example #03 - Pass custom separator for Customer Table

[](#example-03---pass-custom-separator-for-customer-table)

Suppose separator is `_` underscore.

```
// 1st time create customer username.
UniqueSlug::make('customers', 'jony', 'username', '_');
// Output: jony

// 2nd time create customer username.
UniqueSlug::make('customers', 'jony', 'username', '_');
// Output: jony_1

// 3rd time create customer username.
UniqueSlug::make('customers', 'jony', 'username', '_');
// Output: jony_2

// 4th time create customer username.
UniqueSlug::make('customers', 'jony', 'username', '_');
// Output: jony_3
```

Contribution
------------

[](#contribution)

Anyone can create any Pull request.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

4

Last Release

1251d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

Unique Sluglaravel\_unique\_slugLaravel-Sluglaravel unicode unique slug generatorlaravel-unicode-unique-slug

### Embed Badge

![Health badge](/badges/cserobiul-slug/health.svg)

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

###  Alternatives

[maniruzzaman/laravel-unique-slug

A simple but beautiful unique slug generator for Laravel eloquent model.

111.8k](/packages/maniruzzaman-laravel-unique-slug)

PHPackages © 2026

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