Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Taking your approach on designing things actually makes it fun, more natural, and overall easier.

— Dominik, Developer

ends_with Modifier

Returns true if the value ends with a given string. This comparison is case-insensitive.

punchline: That's what she said!
{{ if (punchline | ends_with('she said!')) }}
{{ if (punchline | ends_with('your mom!')) }}
@if (Statamic::modify($punchline)->endsWith('she said!')->fetch())
 
@endif
 
@if (Statamic::modify($punchline)->endsWith('your mom!')->fetch())
 
@endif
true
false
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →