PHP code example of darkotodoric / url-slug-generator

1. Go to this page and download the library: Download darkotodoric/url-slug-generator 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/ */

    

darkotodoric / url-slug-generator example snippets




Generator = new SlugGenerator();

$slug = $slugGenerator->make('Golden Globes 2024: Oppenheimer and Succession sweep up');
// golden-globes-2024-oppenheimer-and-succession-sweep-up

$slug = $slugGenerator->make('I’ve looked through LG’s new transparent OLED TV, and seen something special!');
// i-ve-looked-through-lg-s-new-transparent-oled-tv-and-seen-something-special