Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Console Log Modifier

Debug a variable by dumping its contents to your browser's JavaScript's console via console.log.

fruit:
- apples
- bananas
- bacon
{{ fruit | console_log }}
@php(Statamic::modify($fruit)->consoleLog())
["apples", "banana", "jerky"]