Slugify

Slugify

Simplest Slugify for PHP to convert string into a slug.

Moamen Eltouny (Raggi) Chun-Sheng, Li (Peter)
source PHP Version : >= 7.2 License Support
Source Packagist Version Packagist Downloads

Install

Slugify requires the Multibyte String mbstring extension from PHP.

Install the latest version using Composer

composer require pharaonic/php-slugify
Usage

Get Slug

Generate a slug from a string

use Pharaonic\Slugify\Slugify;

echo Slugify::get('Moamen Eltouny'); // moamen-eltouny
echo slug('Moamen Eltouny'); // [OR] moamen-eltouny

Rules Manipulation

Add/Edit a rule

use Pharaonic\Slugify\Slugify;

Slugify::rule('ö', 'oe');