Detail Dive is a brand new feature of Tinkerwell 4 that provides structured output for your
echo statements. It also allows you to switch between multiple views of the output based on the type of data you are working with.
You may switch between the traditional "CLI" output (like
php artisan tinker) and the new Detail Dive output by clicking the "Detail Dive" button in the top right corner of the Tinkerwell window.
When Detail Dive is enabled, you may use the
echo statements as usual.
Instead of the traditional, rather unstructured output, Detail Dive will provide individual cards for each output/dumped value.
If the output is a nested array or object, the output will be collapsed by default. You may click on the arrow icons on each collapsed line to expand the output. Additionally, you may configure Detail Dive to automatically expand all output by default in the Tinkerwell settings.
When in Detail Dive mode, you may toggle the "SQL" button in the top right corner of the Tinkerwell window to inspect SQL queries that were executed during your code execution.
Please note that this feature is currently only available for Laravel and WordPress projects.
When the output of your code is a collection or a nested array, a "table" icon will appear in the top right corner of the output card.
Clicking this icon will open a modal window with a table view of the output.
You can also save the given data as CSV - this is especially useful when building more complex Eloquent queries that you want to access as CSV data. Since Tinkerwell executes the code within your application context (locally or via SSH) you can make use of all your Eloquent model relations or scopes.
When working with the table view, it can be very useful to be able to copy a specific row as either JSON data or even as a PHP array. You may right-click on any row in the table view, which will open up a context menu.
This context menu allows you to choose how you want to copy the given row.
Here's the example output of copying one row as a PHP array:
$array = ['name' => 'Marcel','role' => 'Creative Genius',];
When the output of your code is a nested array or object, an "eye" icon will appear in the top right corner of the output card.
Clicking this icon will open a modal window with a graph view of the output. This graph view allows you to inspect the structure of the output in a more visual way. You may click on the nodes to expand them and see their children.
When dumping a Laravel view or mailable, you may click the "eye" icon in the top right corner of the output card to open a modal window with a rendered HTML view of the output.
This allows you to quickly inspect the rendered HTML of your views and mailables.
While the HTML preview is open, you may re-run your code via the configured shortcut (default:
Cmd/Ctrl + R) to see the updated HTML output.
or upgrade to lifetime with a % discount and get all updates that we'll ever make.Upgrade to Lifetime License ()