PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Moamen Eltouny   PHP Slugify   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Slugify
Create a slug text from a given text string
Author: By
Last change:
Date: 3 years ago
Size: 1,418 bytes
 

Contents

Class file image Download

<p align="center"><a href="https://pharaonic.io" target="_blank"><img src="https://raw.githubusercontent.com/Pharaonic/logos/main/php/slugify.jpg" width="470"></a></p>

<p align="center"> <a href="https://github.com/Pharaonic/php-slugify" target="_blank"><img src="http://img.shields.io/badge/source-pharaonic/php--slugify-blue.svg?style=flat-square" alt="Source"></a> <a href="https://packagist.org/packages/pharaonic/php-slugify" target="_blank"><img src="https://img.shields.io/packagist/v/pharaonic/php-slugify?style=flat-square" alt="Packagist Version"></a> <img src="https://img.shields.io/packagist/dt/pharaonic/php-slugify?style=flat-square" alt="Packagist Downloads"> <img src="http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" alt="Source"> </p>

<h1 align="center">Simplest Slugify for PHP.</h1>

Install

Slugify requires the Multibyte String mbstring extension from PHP.<br> Install the latest version using Composer:

$ composer require pharaonic/php-slugify

Usage

<a name="GS"></a>

Get Slug

use Pharaonic\Slugify\Slugify;
echo Slugify::get('Moamen Eltouny');

// OR
echo slug('Moamen Eltouny');

<a name="RM"></a>

Rules Manipulation

use Pharaonic\Slugify\Slugify;
Slugify::rule('ö', 'oe');

License

MIT license