PHPackages                             didweb/slug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. didweb/slug

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

didweb/slug
===========

Creacion de slugs para url amigables

2.0.2(11y ago)025GPLv3PHP

Since May 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Didweb/Slug)[ Packagist](https://packagist.org/packages/didweb/slug)[ Docs](https://github.com/Didweb)[ RSS](/packages/didweb-slug/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (6)Used By (0)

🇩🇪 Slug
=======

[](#de-slug)

Dises ist ein kleine Script um Slug zu machen.

Installation.
-------------

[](#installation)

Installation des Komponisten in der `composer.json` setzen ...

```
"require": {
        ....
        "didweb/slug": "2.*"
        ....
     }

```

In der `app/AppKernel.php` put setzen ...

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

```

In der Konfigurationsdatei: `app/config/config.yml` ...

```
imports:
    - { resource: "@SlugSlugBundle/Resources/config/services.yml" }

```

### Beispiel Verwendung

[](#beispiel-verwendung)

Wenn Sie den Dienst im Controller Nutzung verwenden möchten es folgt ....

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

```

Der Standard-Code ist der Bindestrich `-` Separator. Sie können den Separator ändern, mit dem Sie, indem sie als Parameter in der `clean` Funktion wollen. Der Spacer ist ein optionaler Parameter so, wenn nicht spezifisch wird der Bindestrich `-` Standard.

Beispiel des Separators für eine Unterstreichungs modifizierende `_`:

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

```

---

🇬🇧 Slug
=======

[](#uk-slug)

It is a small script to make Slugs.

Installation
------------

[](#installation-1)

Installation using composer, put in `composer.json` file ...

```
"require": {
        ....
        "didweb/slug": "2.*"
        ....
     }

```

In the `app/AppKernel.php` file put put ...

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

```

In the configuration file: `app/config/config.yml` import the service like this:

```
imports:
    - { resource: "@SlugSlugBundle/Resources/config/services.yml" }

```

### Example of use

[](#example-of-use)

When you want to use the service inside the controller use it as follows ....

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

```

The default code has the `-` half-dash as a separator. You can change the separator you want by passing it as a parameter in the `cleaning` function. The separator is an optional parameter so if you do not specify it you will have the default `-` by default.

Example modifying the separator by a dash under `_`:

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

```

---

🇪🇸 Slug
=======

[](#es-slug)

Es un pequeño script para realizar Slugs.

Instalación
-----------

[](#instalación)

Instalación mediante composer, poner en el archivo `composer.json` ...

```
"require": {
        ....
        "didweb/slug": "2.*"
        ....
     }

```

En el archivo `app/AppKernel.php` poner poner...

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

```

En el archivo de configuración: `app/config/config.yml` importar el servicio de esta manera:

```
imports:
    - { resource: "@SlugSlugBundle/Resources/config/services.yml" }

```

### Ejemplo de uso

[](#ejemplo-de-uso)

Cuando quieras utilizar el servicio dentro del controlador utilízalo de la siguiente manera....

```

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

```

El código por defecto tiene el guión medio `-` como separador. Puedes cambiar el separador por el que tu quieras pasándolo como un parámetro en la función `clean`. El separador es un parámetro opcional así que si no lo especificas tendrá el guión medio `-` por defecto.

Ejemplo modificando el separador por un guión bajo `_`:

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

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

4373d ago

Major Versions

1.0.1 → 2.0.02014-05-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf4652007cd885b38677922c0e5f97f329ec2c51d610e6c825e7de0204687ad4?d=identicon)[Didweb](/maintainers/Didweb)

---

Top Contributors

[![Didweb](https://avatars.githubusercontent.com/u/3083692?v=4)](https://github.com/Didweb "Didweb (17 commits)")

---

Tags

slugurls amigablesurl seo

### Embed Badge

![Health badge](/badges/didweb-slug/health.svg)

```
[![Health](https://phpackages.com/badges/didweb-slug/health.svg)](https://phpackages.com/packages/didweb-slug)
```

###  Alternatives

[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

254.1M7](/packages/voku-urlify)[keyvanakbary/slugifier

A full-featured, simple, clean and pure functional implementation for creating slugs

68187.9k4](/packages/keyvanakbary-slugifier)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

39488.5k](/packages/wazum-sluggi)[internetgalerie/ig-slug

Rebuild URL slugs

12861.7k2](/packages/internetgalerie-ig-slug)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
