Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

To Tabs Modifier

Converts all instances of a specified number of spaces in a string to tabs. 4 by default. This is a boring modifier to output examples of. Here's just a few examples on how the syntax looks.

{{ string | to_tabs }}
{{ string | to_tabs(4) }}
{{ Statamic::modify($string)->toTabs() }}
{{ Statamic::modify($string)->toTabs(4) }}