URL Encode Modifier
URL-encodes a string. The inverse of urldecode.
string: I just want & need $pecial characters!
{{ string | urlencode }}
{!! Statamic::modify($string)->urlencode() !!}
I+just+want+%26+need+%24pecial+characters%21
If you don't want forward slashes (/) to be encoded, use the urlencode_except_slashes modifier instead.