webpatser / laravel-sanitize by webpatser

Laravel package to sanatize a string for use as URL's. It uses the PHP Normalizer class and fills whitespace with dashes.
Package Data
Maintainer Username: webpatser
Maintainer Contact: christoph@downsized.nl (Christoph Kempen)
Package Create Date: 2013-10-31
Package Last Update: 2015-10-12
Language: PHP
License: MIT
Last Refreshed: 2021-07-20 03:21:51
Package Statistics
Total Downloads: 31,518
Monthly Downloads: 145
Daily Downloads: 4
Total Stars: 6
Total Watchers: 1
Total Forks: 2
Total Open Issues: 2

Laravel Sanitize Build Status

Laravel package to sanitize a string for use in URL's


Add webpatser/laravel-sanitize to composer.json.

"webpatser/laravel-sanitize": "dev-master"

Run composer update to get the latest version of Sanitize.

Edit app/config/app.php and add the alias

'aliases' => array(
    'Sanitize' => 'Webpatser\Sanitize\Sanitize',


Sanitize::string('Sanitize me please!'); // sanitize-me-please


It uses the PHP Normalizer class and does some extra magic, and wraps it in the Laravel 4 grand scheme of things.