阅读(1112) (9)

Laravel 8 Str::slug() {#collection-method}

2021-07-03 16:54:20 更新

Str::slug 函数将给定的字符串生成一个 URL 友好的「slug」:

use Illuminate\Support\Str;

$slug = Str::slug('Laravel 5 Framework', '-');

// laravel-5-framework