Ensure Right Modifier
Ensures that the string ends with a specified string. If it doesn't, it will now.
links:
- statamic
- wilderborn.com
{{ links }}
<li>{{ value | ensure_right('.com') }}</li>
{{ /links }}
@foreach ($links as $link)
<li>{{ Statamic::modify($value)->ensureRight('.com') }}</li>
@endforeach
<li>statamic.com</li>
<li>wilderborn.com</li>
Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page