PHP code example of didweb / slug

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

    

didweb / slug example snippets


$bundles = array(
    ...
    new Slug\SlugBundle\SlugSlugBundle(),
    ....
    );


    $text = 'Text Besipiel: Á è ñ P % --o Wç ü ö ä';
    $slug = $this->get('didweb_slug.accion');
    $res = $slug->clean($texto);


    $text = 'Text Besipiel: Á è ñ P % --o Wç ';
    $slug = $this->get('didweb_slug.accion');
    $res = $slug->clean($text,'_');


$bundles = array(
    ...
    new Slug\SlugBundle\SlugSlugBundle(),
    ....
    );


    $text = 'Texto de ejemplo: Á è ñ P % --o Wç ';
    $slug = $this->get('didweb_slug.accion');
    $resultado = $slug->clean($text);


$bundles = array(
    ...
    new Slug\SlugBundle\SlugSlugBundle(),
    ....
    );



    $text = 'Texto de ejemplo: Á è ñ P % --o Wç ';
    $slug = $this->get('didweb_slug.accion');
    $resultado = $slug->clean($text);