Pharaonic
Loading...

Getting Started

Slugify
php-slugify

# Why Slugify?

Slugify is a package that helps you to convert the string into a slug.
For example : Convert My name is Raggi To my-name-is-raggi.

# Installation

Install the latest version using Composer.

1composer require pharaonic/php-slugify

# Usage

Generate a slug from a string, there is 2 ways that helps you to generate the slug.

1// WAY 1
2use Pharaonic\Slugify\Slugify;
3echo Slugify::get('Moamen Eltouny'); // moamen-eltouny
4 
5// WAY 2
6echo slug('Ramy Salama'); // ramy-salama

And you can add/edit a rule that helps in slug manipulation.

1use Pharaonic\Slugify\Slugify;
2 
3Slugify::rule('ü', 'ue');
4echo Slugify::get('die Prüfung'); // die-pruefung

# Contributors

MoamenEltouny
19 Contributions
peter279k
4 Contributions