PHPackages                             bingogg14/slugify - 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. bingogg14/slugify

ActiveLibrary

bingogg14/slugify
=================

Converts a string into a slug. Port from simov/slugify

v1.4.5-beta(3y ago)040↓100%MITPHPPHP ^7.1 || ~8.0.0 || ~8.1.0 || ~8.2.0

Since Apr 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bingogg14/slugify)[ Packagist](https://packagist.org/packages/bingogg14/slugify)[ RSS](/packages/bingogg14-slugify/feed)WikiDiscussions main Synced 1mo ago

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

Bingogg/slugify
===============

[](#bingoggslugify)

> Converts a string into a slug. Port from simon/slugify

Developed by [Pavlo Harashchenko](https://p-h-h.com) in Tallinn, Europe with the help of [cocur/slugify](https://github.com/cocur/slugify). [simov/slugify](https://github.com/simov/slugify).

Features
--------

[](#features)

- Port package simov/slugify to php
- Provides custom replacements.
- No external dependencies.
- PSR-4 compatible.
- Compatible with PHP &gt;= 7.
- Integrations for [Laravel](http://laravel.com)

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

[](#installation)

You can install Slugify through [Composer](https://getcomposer.org):

```
composer require bingogg14/slugify
```

Slugify requires the Multibyte String extension from PHP. Typically you can use the configure option `--enable-mbstring` while compiling PHP. More information can be found in the [PHP documentation](http://php.net/manual/en/mbstring.installation.php).

Further steps may be needed for [integrations](#integrations).

Usage
-----

[](#usage)

Generate a slug:

```
use Bingogg\Slugify\Slugify;

$slugify = new Slugify();
echo $slugify->slugify("Hello World!"); // hello-world
```

You can also change the separator used by `Slugify`:

```
echo $slugify->slugify("Hello World!", "_"); // hello_world
```

The library also contains `Bingogg\Slugify\SlugifyInterface`. Use this interface whenever you need to type hint an instance of `Slugify`.

### Contributing

[](#contributing)

We really appreciate if you report bugs and errors in the transliteration, especially if you are a native speaker of the language and question. Feel free to ask for additional languages in the issues, but please note that the maintainer of this repository does not speak all languages. If you can provide a Pull Request with rules for a new language or extend the rules for an existing language that would be amazing.

Submit PR. Thank you very much. 🇺🇦

### Code of Conduct

[](#code-of-conduct)

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

The full Code of Conduct can be found [here](https://github.com/bingogg14/slugify/blob/master/CODE_OF_CONDUCT.md).

This project is no place for hate. If you have any problems please contact Pavlo:  🇺🇦

Integrations
------------

[](#integrations)

### Laravel

[](#laravel)

Slugify also provides a service provider to integrate into Laravel (versions 4.1 and later).

In your Laravel project's `app/config/app.php` file, add the service provider into the "providers" array:

```
'providers' => array(
    "Bingogg\Slugify\Bridge\Laravel\SlugifyServiceProvider",
)
```

And add the facade into the "aliases" array:

```
'aliases' => array(
    "Slugify" => "Bingogg\Slugify\Bridge\Laravel\SlugifyFacade",
)
```

You can then use the `Slugify::slugify()` method in your controllers:

```
$url = Slugify::slugify("welcome to the homepage");
```

After that you can retrieve the `Bingogg\Slugify\Slugify` service (or the `slugify` alias) and generate a slug.

Change Log
----------

[](#change-log)

### Version 1.4.5 (11 April 2023)

[](#version-145-11-april-2023)

- Public beta version port

Authors
-------

[](#authors)

- [Pavlo Harashchenko](https://p-h-h.com)

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2023 Pavlo Harashchenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

1129d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/882b003303533e1e61ecf0740ce4a1499ebd18666e1f001d0e207db3a0cc2b9a?d=identicon)[bingogg14](/maintainers/bingogg14)

---

Top Contributors

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

---

Tags

slugslugify

### Embed Badge

![Health badge](/badges/bingogg14-slugify/health.svg)

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

###  Alternatives

[cocur/slugify

Converts a string into a slug.

3.0k66.7M328](/packages/cocur-slugify)[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[cviebrock/eloquent-sluggable

Easy creation of slugs for your Eloquent models in Laravel

4.0k13.6M253](/packages/cviebrock-eloquent-sluggable)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[keyvanakbary/slugifier

A full-featured, simple, clean and pure functional implementation for creating slugs

68187.9k4](/packages/keyvanakbary-slugifier)

PHPackages © 2026

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