geosocio/slugger
Composer 安装命令:
composer require geosocio/slugger
包简介
Creates URL Slugs from Strings
README 文档
README
Create URL Slugs From UTF-8 Strings
Rules
- Trim Whitespace
- Lowercase (if possible)
- Replace (space) with
-(dash) - Remove
.,(, and) - Remove any duplicate
-(dashes) - 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
统计信息
- 总下载量: 90
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2017-07-30