Useful development debugging tools for Twig on PyroCMS 3.x
Twigtools is a PyroCMS plugin, providing useful tools for development and debugging with twig., (*1)
Initially this provides the following functions inside twig templates:, (*2)
dd
Dumps an item and kills the rest of the page.debug
Dumps an item and continues executiondebug
Debugs an item to Debugbar under the Messages tabYou can install this plugin into your existing PyroCMS 3.x installation by requiring it inside your composer file:, (*3)
"require-dev": { "evoluted/twigtools-plugin": "~1.0",` }
Or by running the command line composer install command:, (*4)
composer require evoluted/twigtools-plugin
, (*5)
Once installed you will not have to perform any additional actions to start using this plugin., (*6)
dd(yourVariable)
, (*7)
Uses Laravels dump method, and stops execution., (*8)
dump(yourVariable)
, (*9)
Uses Laravels dump method, but continues rendering the rest of the page., (*10)
debug(yourVariable)
, (*11)
Debugs a variable to Laravel Debugbar (if it is installed), (*12)
dd()
, debug()
, debug()
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)