Easy dump & "dump&die" functions for Twig.
This plugin works with Craft CMS 3, 4 or 5.
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require studioespresso/craft-dumper
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Dumper.
When you install the plugin, you'll be able to use Symfony\VarDumper
in your Twig templates like this:
{{ d(entry) }}
Or you can "dump and die"
{{ dd(entry) }}
Works on strings, arrays, object, etc.