PHP code example of ballen / sluginator
1. Go to this page and download the library: Download ballen/sluginator 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/ */
ballen / sluginator example snippets
use Ballen\Sluginator\Slug;
$slug = new Slug('My awesomely *wickid* example title!!!');
echo $slug;
use Ballen\Sluginator\Slug;
$slug = new Slug('My awesomely *wickid* example title!!!');
$slug->setUseLowercase(false)->setSpaceCharacter('_')->build();
echo $slug->getSlug();