PHPackages                             pfrug/laravel-debug-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. pfrug/laravel-debug-helpers

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

pfrug/laravel-debug-helpers
===========================

Useful debugging helpers for Laravel development

v1.1.0(5mo ago)0529↑100%MITPHPPHP ^8.0

Since Sep 16Pushed 5mo agoCompare

[ Source](https://github.com/pfrug/laravel-debug-helpers)[ Packagist](https://packagist.org/packages/pfrug/laravel-debug-helpers)[ Docs](https://github.com/pfrug/laravel-debug-helpers)[ RSS](/packages/pfrug-laravel-debug-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

laravel-debug-helpers
=====================

[](#laravel-debug-helpers)

A small set of developer utilities for Laravel. These helpers provide debugging functions that should probably exist in Laravel by default.

Features
--------

[](#features)

### Dump helpers

[](#dump-helpers)

#### `d(...$vars)`

[](#dvars)

Like `dump()`, but does **not** stop execution.

#### `dt(...$vars)`

[](#dtvars)

Like `dump()`, but if the variable is arrayable (e.g. Eloquent models), it converts it to array before dumping.

#### `ddt(...$vars)`

[](#ddtvars)

Same as `dt()`, but dies after dumping.

You can use these in place of `dump()` and `dd()` when working with Eloquent models or arrays.

---

### SqlHelper

[](#sqlhelper)

#### `SqlHelper::sqlFromBindings($query, $print = true)`

[](#sqlhelpersqlfrombindingsquery-print--true)

Combines `toSql()` and `getBindings()` on a query builder or Eloquent builder to output the full SQL string with all bindings inlined.

This is useful for debugging complex queries.

```
use LaravelDebugHelpers\SqlHelper;

// Complex query with joins and subqueries
$query = User::join('profiles', 'users.id', '=', 'profiles.user_id')
            ->leftJoin('organizations', 'users.organization_id', '=', 'organizations.id')
            ->whereHas('roles', function($q) {
                $q->whereIn('name', ['admin', 'moderator']);
            })
            ->where('users.status', 'active')
            ->where('users.email_verified_at', '!=', null)
            ->where(function($q) {
                $q->where('profiles.is_public', 1)
                  ->orWhere('users.account_type', 'premium');
            })
            ->where('organizations.country', 'US')
            ->where('users.created_at', '>=', now()->subMonths(6))
            ->select('users.id', 'users.name', 'users.email', 'profiles.bio', 'organizations.name as org_name')
            ->orderBy('users.created_at', 'desc')
            ->limit(25);

SqlHelper::sqlFromBindings($query);
```

Output:

```
SELECT
    `users`.`id`,
    `users`.`name`,
    `users`.`email`,
    `profiles`.`bio`,
    `organizations`.`name` AS `org_name`
FROM `users`
    INNER JOIN `profiles` ON `users`.`id` = `profiles`.`user_id`
    LEFT JOIN `organizations` ON `users`.`organization_id` = `organizations`.`id`
    WHERE EXISTS (
        SELECT
            *
        FROM `roles`
            INNER JOIN `user_roles` ON `roles`.`id` = `user_roles`.`role_id`
        WHERE `users`.`id` = `user_roles`.`user_id`
            AND `name` IN ('admin', 'moderator')
    )
    AND `users`.`status` = 'active'
    AND `users`.`email_verified_at` IS NOT NULL
    AND (
        `profiles`.`is_public` = 1
        OR
        `users`.`account_type` = 'premium'
    )
    AND `organizations`.`country` = 'US'
    AND `users`.`created_at` >= '2025-04-01 14:26:52'
ORDER BY `users`.`created_at` desc
```

If `$print` is `false`, it returns the SQL string instead of printing and stopping.

---

Installation
------------

[](#installation)

Install via composer:

```
composer require pfrug/laravel-debug-helpers
```

If package auto-discovery is disabled, register the service provider manually in `config/app.php`:

```
'providers' => [
    LaravelDebugHelpers\DevUtilsServiceProvider::class,
],
```

---

Disclaimer
----------

[](#disclaimer)

These utilities are intended for development only. Do not leave `ddt()` or raw SQL dump calls in production environments.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance71

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Total

2

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdea59e3f90698df3c5fa81e8b9f40e0444a32a1bc99270314ef976a90735e70?d=identicon)[frugone](/maintainers/frugone)

---

Top Contributors

[![pfrug](https://avatars.githubusercontent.com/u/5391920?v=4)](https://github.com/pfrug "pfrug (8 commits)")

---

Tags

laravelhelpersdebugdevelopment

### Embed Badge

![Health badge](/badges/pfrug-laravel-debug-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/pfrug-laravel-debug-helpers/health.svg)](https://phpackages.com/packages/pfrug-laravel-debug-helpers)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k124.3M624](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/laravel-web-tinker

Artisan Tinker in your browser

1.2k3.8M6](/packages/spatie-laravel-web-tinker)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[php-console/laravel-service-provider

Laravel service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

7361.2k1](/packages/php-console-laravel-service-provider)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
