Starting in Laravel 5.7 you’ll get this command out-of-the-box that allows you to dump data to the console or an HTML file instead of to the browser:
1php artisan dump-server23# Or send the output to an HTML file4php artisan dump-server --format=html > dump.html
The command runs a server in the background that collects data sent from the application that sends the output through the console. When the command is not running in the foreground, the
dump() function works as expected by default.
You can learn more about the Dump Server package from our write-up, and you can contribute to it on GitHub at beyondcode/laravel-dump-server: Bring Symfony’s Var-Dump Server to Laravel.