eschmar / slugify-bundle
Provides static method to convert strings to slugs and twig filter.
Installs: 563
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.1.0
- symfony/flex: *
This package is auto-updated.
Last update: 2024-10-23 06:17:22 UTC
README
Provides static method to convert strings to slugs as well as a twig filter for symfony. If you only need the static class, you'll find it here.
Install
Composer (Packagist):
composer require eschmar/slugify-bundle ~v2.0 # Symfony Flex composer require eschmar/slugify-bundle ~v1.0 # Symfony 2
app/Appkernel.php:
new Eschmar\SlugifyBundle\EschmarSlugifyBundle(),
Usage
use Eschmar\SlugifyBundle\Util\Slug; $test = Slug::ify("String to be slugified"); // results in $test == "string-to-be-slugified"
Twig Extension
{{ "String to be slugified"|slugify }}
License
MIT License