A better dd() for your TDD
An important part of every Laravel developer’s debugging arsenal is the humble dd() helper function — “dump and die” — to output the contents of a variable and terminate execution of your code. In the browser, dd() results in a structured, easy-to-read tree, complete with little arrow buttons that can be clicked to expand or hide children of nested structures. In the terminal, however, it’s a different story.
Fortunately, it’s simple to build your very own customized version of dd() to help tame your unwieldly terminal output.