2017 © Pedro Peláez
 

library slugger

Creates URL Slugs from Strings

image

geosocio/slugger

Creates URL Slugs from Strings

  • Friday, January 26, 2018
  • by davidbarratt
  • Repository
  • 1 Watchers
  • 1 Stars
  • 71 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Slugger Build Status Coverage Status

Create URL Slugs From UTF-8 Strings, (*1)

Rules

  1. Trim Whitespace
  2. Lowercase (if possible)
  3. Replace (space) with - (dash)
  4. Remove ., (, and )
  5. Remove any duplicate - (dashes)
  6. Trim any - (dashes) from the beginning or end

Example

$slugger = new \GeoSocio\Slugger\Slugger();
echo $slugger->slug('St. Petersburg');
// st-petersburg

See more examples in tests/SluggerTest.php, (*2)

The Versions

26/01 2018

dev-develop

dev-develop

Creates URL Slugs from Strings

  Sources   Download

LGPL-3 LGPL-3.0-or-later

The Development Requires

26/01 2018

1.1.2

1.1.2.0

Creates URL Slugs from Strings

  Sources   Download

LGPL-3.0-or-later

The Development Requires

26/01 2018

1.1.1

1.1.1.0

Creates URL Slugs from Strings

  Sources   Download

LGPL-3.0

The Development Requires

20/08 2017

1.1.0

1.1.0.0

Creates URL Slugs from Strings

  Sources   Download

LGPL-3

The Development Requires

31/07 2017

1.0.0

1.0.0.0

Creates URL Slugs from Strings

  Sources   Download

LGPL-3

The Development Requires