PHPackages                             ispooya/slugger - 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. ispooya/slugger

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

ispooya/slugger
===============

A lightweight PHP slug generator supporting Persian (Farsi), Arabic, and Latin-based languages for SEO-friendly URLs

1.0.4(2y ago)0500MITPHPPHP ^8.2

Since Sep 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ispooya/slugger)[ Packagist](https://packagist.org/packages/ispooya/slugger)[ RSS](/packages/ispooya-slugger/feed)WikiDiscussions master Synced today

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

Slugger
=======

[](#slugger)

A PHP package for converting strings into URL-friendly slugs with extensive character transliteration support.

Features
--------

[](#features)

- Converts strings to URL-friendly slugs
- Comprehensive special character transliteration
- Customizable separator
- Handles multiple language characters including:
    - Persian (Farsi) characters
    - Latin extended characters
    - Germanic umlauts
    - Eastern European characters
    - Scandinavian characters
    - And many more...

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

[](#installation)

You can install the package via Composer:

```
composer require ispooya/slugger
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Ispooya\Slugger\Services\Slugger;

$slugger = new Slugger();
$slug = $slugger->make('Hello World'); // Output: "hello-world"
```

### Custom Separator

[](#custom-separator)

You can specify a custom separator as the second parameter:

```
$slugger = new Slugger();
$slug = $slugger->make('Hello World', '_'); // Output: "hello_world"
```

### Examples with Special Characters

[](#examples-with-special-characters)

```
$slugger = new Slugger();
$slug = $slugger->make('سلام دنیا'); // Output: "سلام-دنیا"
$slug = $slugger->make('München'); // Output: "muenchen"
$slug = $slugger->make('État du café'); // Output: "etat-du-cafe"
$slug = $slugger->make('Århus København'); // Output: "arhus-kobenhavn"
```

Supported Transformations
-------------------------

[](#supported-transformations)

The package supports a wide range of character transformations, including:

- Persian (Farsi) characters
- `ä`, `æ`, `ǽ` → `ae`
- `ö`, `œ` → `oe`
- `ü` → `ue`
- All major accented characters (à, á, â, etc.)
- Special characters from multiple languages
- Common ligatures
- And many more...

Method Reference
----------------

[](#method-reference)

### make()

[](#make)

```
public function make(string|null $string, string $separator = '-'): string|null
```

#### Parameters:

[](#parameters)

- `$string`: The input string to convert to a slug
- `$separator`: (Optional) The separator to use between words (defaults to '-')

#### Returns:

[](#returns)

- A URL-friendly slug string, or null if the input is null

License
-------

[](#license)

[MIT License](LICENSE)

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

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

Credits
-------

[](#credits)

Created by [ispooya](https://github.com/ispooya)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Recently: every ~63 days

Total

6

Last Release

776d ago

PHP version history (2 changes)1.0.0PHP ^7.3|^8.0

v1.0.3.x-devPHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/96780618?v=4)[Pooya Karimi](/maintainers/ispooya)[@ispooya](https://github.com/ispooya)

---

Top Contributors

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

---

Tags

laravelphp

### Embed Badge

![Health badge](/badges/ispooya-slugger/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M374](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M137](/packages/illuminate-cookie)

PHPackages © 2026

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