Recently, I came to the opening of this amazing plugin that allows you to reset variables, trace requests, runtimes, views, controllers, queries, profile memory, runtime, etc., everything related to the current page being displayed. Very useful:
https://laravel-news.com/laravel-debugbar
You can install it through the composer:
composer require barryvdh/laravel-debugbar --dev
Then add it to the array of service providers in /config/app.php
Debugbar will start working immediately if debugging mode is turned on: for this you just need to change the .env file in config/app.php or debug_mode to true ,
If you want to use dump methods in the debugbar console, you need to include the alias in the /config/app.php array:
'Debugbar' => Barryvdh\Debugbar\Facade::class,
Now you can start resetting variables as follows:
\Debugbar::info($variable);
Pretty cool plugin. Hooray!
source share