threefilms/laravel-query-dump

Laravel DB Query Dump.

Installs: 326

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/threefilms/laravel-query-dump

v1.0.0 2023-11-27 09:11 UTC

This package is auto-updated.

Last update: 2025-09-27 14:22:57 UTC


README

DB Query Dump for Laravel.

  • Notice: @dev-master
  • Warning: Do not use in projects that deal with sensitive data.

Install

composer require --dev threefilms/laravel-query-dump

Usage

<?php

use ThreeFilms\LaravelQueryDump\QueryDump;
use Illuminate\Support\Facades\DB;

// [1/2] enable QueryLog
QueryDump::enableQueryLog();

DB::table('posts')->where('author_id', '=', 12)->limit(10)->get();

// [2/2] Query Dump
QueryDump::dd();

Result

 select
  `*`
from
  `posts`
where
  `author_id` = 12
limit 10

Short Hand Helper

<?php

use Illuminate\Support\Facades\DB;

// [1/2] enable QueryLog
qd_enable();

DB::table('posts')->where('author_id', '=', 12)->limit(10)->get();

// [2/2] Query Dump
qd_dd();