Get expert guidance in a few days with a Laravel code review

Dumps

Dumps stats

Downloads
96
Stars
31
Open Issues
0
Forks
0

View on GitHub →

A Laravel command to intercept dumps from your Laravel application.

Solo Dumps for Laravel

Solo Dumps for Laravel is a package that intercepts and collects dump() calls from your Laravel application and displays them in a dedicated terminal window. This eliminates the need to clutter your browser or API responses with debug output.

This library was built to support Solo, your all-in-one Laravel command to tame local development.

This package is especially useful when:

  • You're working with APIs where you can't see dumps in the browser
  • You want to keep your browser console clean
  • You want to centralize all your debugging output in one place
  • You need source file information for your dumps

Installation

  1. Require the package:
composer require soloterm/dumps --dev

The package will automatically register the service provider.

Usage

Simply run:

php artisan solo:dumps

This will start a server that intercepts all dump() calls from your Laravel application. The command will keep running and display any dumps in real-time.

Now when you use dump() anywhere in your application, the output will be sent to this terminal window instead of your browser or API response.

Features

  • Intercepts all dump() calls from your Laravel application
  • Shows the exact file and line number where the dump was called
  • Formats the output using Laravel's CLI dumper for better readability
  • Works with APIs, background jobs, and other contexts where dumps are normally hard to see
  • Preserves all the functionality of Laravel's dump helper
  • Restores regular dump functionality when the command is stopped

Works with Solo for Laravel

If you're using Solo for Laravel, you can add the dumps command to your configuration:

// config/solo.php
 
'commands' => [
// ... other commands
'Dumps' => 'php artisan solo:dumps',
],

Configuration

You can configure the dump server host in your config/solo.php file:

// config/solo.php
 
return [
// ... other configurations
'dump_server_host' => 'tcp://127.0.0.1:9984',
];

There is no dedicated dumps config file. You can either create a solo.php and put the dump_server_host in there, or add it to your existing solo.php file.

How It Works

The package works by:

  1. Registering a custom var dumper handler that captures dump calls
  2. Resolving the source file and line number of the dump before sending to the server
  3. Sending the dump data to a server running in a separate process
  4. Displaying the formatted dump with source information in the terminal

FAQ

Does this work with dd()?

No, this package only intercepts dump() calls. The dd() function will still halt execution as normal.

Can I use this with APIs?

Yes! This is one of the main benefits. Your API responses will remain clean while all dumps go to the dedicated terminal window.

Will this affect my application in production?

The package is designed to be used in development only. It's recommended to install it with the --dev flag to ensure it's not included in production.

Support

This is free! If you want to support me:

Credits

Dumps for Laravel was developed by Aaron Francis. If you like it, please let me know!

soloterm photo

Solo for Laravel

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Soloterm Dumps Related Articles

Powerful Debugging for PHP & Laravel with LaraDumps image

Powerful Debugging for PHP & Laravel with LaraDumps

Read article
Laravel Herd Raycast Extension image

Laravel Herd Raycast Extension

Read article
Solo Dumps for Laravel image

Solo Dumps for Laravel

Read article
Laravel 12.2 Introduces Custom Starter Kits image

Laravel 12.2 Introduces Custom Starter Kits

Read article
Laravel Herd v1.7 is out with updates to the dump UI image

Laravel Herd v1.7 is out with updates to the dump UI

Read article
Herd 1.4.0 is now out with a pro version and Windows in the works image

Herd 1.4.0 is now out with a pro version and Windows in the works

Read article
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel