Laravel Dumper - Improve the default output of dump() and dd() in Laravel projects

Overview

Laravel Dumper

Improve the default output of dump() and dd() in Laravel projects. Improves the default dump behavior for many core Laravel objects, including:

  • Models
  • Query Builders
  • Service Container
  • Database Connections
  • Carbon Instances
  • Requests and Responses
laravel-dumper.mp4

Installation

Install as a dev dependency:

# composer require glhd/laravel-dumper --dev

Usage

Just use dd() as you would normally, and enjoy the newly curated output!

Comments
  • Installation issue PHP < 8.0

    Installation issue PHP < 8.0

    Hello,

    When running composer require, if PHP is below 8.0, it will throw an error during @php artisan package:discover because of typed properties.

    I would recommand upgrading composer.json with the minimum php version or update classes to make it compatible as it should not be a breaking change

    Regards

    bug 
    opened by akawam 3
  • Laravel-data error

    Laravel-data error

    Describe the bug https://flareapp.io/share/xmNdBkE7

    What version does this affect?

    • Laravel Version: 9.2.0
    • Package Version: 1.0.1

    To Reproduce Create a Laravel Data, then try SongData::from([...]);

    Expected behavior It works

    bug 
    opened by sawirricardo 2
  • Allow usage of Lumen in Caster.php

    Allow usage of Lumen in Caster.php

    Remove type hint for Illuminate\Contracts\Foundation\Application and also allowed \Laravel\Lumen\Application. Error handling could be implemented, but is not necessary in my opinion

    To use it in Lumen in bootstrap/app.php the following line should be added:

    $app->register(\Glhd\LaravelDumper\LaravelDumperServiceProvider::class);

    Fixes #9

    opened by Cyb0rk 2
  • Generated SQL statement contains wrong bindings

    Generated SQL statement contains wrong bindings

    Describe the bug When dumping Query Builder, it generates incorrect SQL statement.

    What version does this affect?

    • Laravel Version: 9.0.0
    • Package Version: 1.0.0

    To Reproduce

    dd(User::where('name', 'test')->whereBetween('id', [1, 2]));
    

    It generates following SQL: select * from "users" where "name" = 'test' and "id" between 'test' and 'test'

    Expected behavior

    SQL: select * from "users" where "name" = 'test' and "id" between 1 and 2

    Additional context

    That lost me a few hours, trying to hunt down the bug in my app, then in Eloquent itself, then checking if it is affected by me being on PHP 8.1, etc.

    bug 
    opened by laacz 2
  • Make ddf/dumpf more obvious in readme

    Make ddf/dumpf more obvious in readme

    I glossed over this a few times in the readme and only realised they were there after source diving and then checking the readme for the helpers I found. This update just makes them a bit more obvious.

    opened by hailwood 1
  • Add sample of each enhanced dumper vs original output

    Add sample of each enhanced dumper vs original output

    This package is pretty awesome! Great work.

    I think it would help the uptake if we could add some way to show the improvement of each dumper. Ideas are

    • Videos like on the readme
    • Screenshots of the top parts
    • Directory of e.g. query_builder_original.txt and query_builder_enhanced.txt
    enhancement 
    opened by hailwood 1
  • Add diffs

    Add diffs

    This addresses #2 by adding sample diffs that are auto-generated from the test cases. It also updates test case names to improve the diff file output.

    opened by inxilpro 0
  • check for laravel version above v9.32.0

    check for laravel version above v9.32.0

    hi,

    before v9.32.0 when dd( Illuminate\Database\Eloquent\Builder ) show query, and it's very useful

    after update don't show query and just return Illuminate\Database\Eloquent\Builder class attribute

    I guess something changed and affected this.

    bug 
    opened by alissn 2
Releases(1.0.1)
  • 1.0.1(Feb 10, 2022)

  • 1.0.0(Jan 24, 2022)

  • 0.5.0(Jan 23, 2022)

    Changed

    • Removed the LaravelDumper facade in favor of registering custom casters directly

    Upgrading

    If you were using the LaravelDumper::for() method, you need to replace it with a direct call to the CustomCaster class. The API is exactly the same—you simply need to import a different class name. See the README for more details.

    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jan 23, 2022)

  • 0.3.0(Jan 21, 2022)

    Added

    • Added support for dynamic custom casters
    • Added LaravelDumper facade
    • Added custom Properties collection for easier manipulation of dumped properties

    Changed

    • Changed Caster interface to use Properties collection
    • Updated all casters to use new Properties collection
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Jan 21, 2022)

  • 0.1.0(Jan 19, 2022)

  • 0.0.1(Jan 19, 2022)

Owner
Galahad
Galahad
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 7.1k Jan 1, 2023
This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception Tracking.

Tideways Middleware for Laravel Octane This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception T

Tideways 7 Jan 6, 2022
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.

A server for debugging more than just Laravel applications. Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps d

Buggregator 311 Jan 4, 2023
Xdebug — Step Debugger and Debugging Aid for PHP

Xdebug Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development aids, such as stack traces, a code profiler, fe

Xdebug 2.8k Jan 3, 2023
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

null 2.7k Dec 25, 2022
A collection of helper methods for testing and debugging API endpoints.

Laravel API Test Helpers This is a collection of helper methods for testing and debugging API endpoints. Installation You can install the package via

Stephen Jude 49 Jul 26, 2022
The ultimate debugging and development tool for ProcessWire

Tracy Debugger for ProcessWire The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS Integrates and extends Nette

Adrian Jones 80 Oct 5, 2022
Generate Laravel test factories from your existing models

Laravel Test Factory Generator php artisan generate:model-factory This package will generate factories from your existing models so you can get starte

Marcel Pociot 923 Dec 16, 2022
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

Barry vd. Heuvel 14.8k Jan 9, 2023
A beautiful error page for Laravel apps

Ignition: a beautiful error page for Laravel apps Ignition is a beautiful and customizable error page for Laravel applications running on Laravel 5.5

Facade 2k Jan 1, 2023
:dromedary_camel: Laravel log viewer

Laravel log viewer TL;DR Log Viewer for Laravel 5, 6, 7 & 8 (still compatible with 4.2 too) and Lumen. Install with composer, create a route to LogVie

Raphaël Huchet 2.9k Jan 5, 2023
:page_with_curl: Provides a log viewer for Laravel

LogViewer By ARCANEDEV© This package allows you to manage and keep track of each one of your log files. NOTE: You can also use LogViewer as an API. Of

ARCANEDEV 2.3k Dec 30, 2022
A Laravel Package to integrate Nette Tracy Debugger

Nette Tracy for Laravel 5 Better Laravel Exception Handler Features Visualization of errors and exceptions Debugger Bar (ajax support @v1.5.6) Excepti

Recca Tsai 383 Dec 6, 2022
An elegant debug assistant for the Laravel framework.

Introduction Laravel Telescope is an elegant debug assistant for the Laravel framework. Telescope provides insight into the requests coming into your

The Laravel Framework 4.4k Dec 27, 2022
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.

RayServer is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms.

Pavel Buchnev 310 Jan 2, 2023
A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

Yireo 16 Dec 16, 2022
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
PHP 5.3+ Extensible Dumper

Ladybug: PHP 5.3+ Extensible Dumper Ladybug provides an easy and extensible var_dump / print_r replacement for PHP 5.3+ projects. Any PHP variable, ob

Raul Fraile 442 Nov 6, 2022
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.

Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to

Dieter Coopman 196 Dec 28, 2022