Skip to content Skip to footer navigation
You are reading the Statamic 6 Alpha docs. πŸ‘€

Raw URL Encode Modifier

URL-encode a variable according to RFC 3986.

example: please and thank you/Mommy
http://example.com/{{ example | rawurlencode }}
https://example.com/{{ Statamic::modify($example)->rawurlencode() }}
http://example.com/please%20and%20thank%20you%2FMommy

If you don't want forward slashes (/) to be encoded, use the rawurlencode_except_slashes modifier instead.