Str::slug()
Convert a string to a safe version to be used in a URL
Parameters
Name | Type | Default | Description |
---|---|---|---|
$string | string |
null |
The unsafe string |
$separator | string |
null |
To be used instead of space and other non-word characters. |
$allowed | string |
null |
List of all allowed characters (regex) |
$maxlength | int |
128 |
The maximum length of the slug |
Return type
string