1. Go to this page and download the library: Download javiereguiluz/easyslugger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
javiereguiluz / easyslugger example snippets
use EasySlugger\Slugger;
$slug = Slugger::slugify('Lorem Ipsum'); // slug = lorem-ipsum
// PHP 5.4 or lower
use EasySlugger\Slugger;
$slugger = new Slugger();
$slug = $slugger->slugify('Lorem Ipsum'); // slug = lorem-ipsum
// PHP 5.5 or higher
$slugger = (new \EasySlugger\Slugger())->slugify('Lorem Ipsum');
use EasySlugger\Slugger;
$slug = Slugger::uniqueSlugify('Lorem Ipsum'); // slug = lorem-ipsum-a2b342f