kazemmdev / slug
A simple slug generator
v1.0.0
2023-09-11 13:11 UTC
Requires
- php: ^8.0
Requires (Dev)
- pestphp/pest: 2.x-dev
README
A simple slug generator works for both ltr and rtl language
Installation
Using composer:
composer require kazemmdev/slug
Usage
<?php use Kazemmdev\Slug\Slug; Slug::handle(string: 'sample text!!??'); // 'sample-text' Slug::handle(string: 'sample-- --text'); // 'sample-text' Slug::handle(string: 'SamPle-tExt'); // 'sample-text' Slug::handle(string: 'نمونه متن'); // 'نمونه-متن' Slug::handle(string: 'عينة النص'); // 'عينة-النص' Slug::handle(string: 'عينةْ اًلنصٌ'); // 'عينة-النص' Slug::handle(string: 'sample text', separator: '+'); // 'sample-text'