Laravel 8 Str::slug() {#collection-method}
Str::slug
函数将给定的字符串生成一个 URL 友好的「slug」:
use Illuminate\Support\Str;
$slug = Str::slug('Laravel 5 Framework', '-');
// laravel-5-framework
Str::slug
函数将给定的字符串生成一个 URL 友好的「slug」:
use Illuminate\Support\Str;
$slug = Str::slug('Laravel 5 Framework', '-');
// laravel-5-framework