threefilms / laravel-query-dump
Laravel DB Query Dump.
v1.0.0
2023-11-27 09:11 UTC
Requires
- php: ^7.2 || ^7.3 || ^7.4 || ^8.0
- composer/composer: ^2.0.0
- doctrine/sql-formatter: ^1.1
- illuminate/support: ^6 || ^7 || ^8 || ^9 || ^10
- laravel/framework: ^v6.0.0|^v7.0.0|^v8.0.0|^9.0.0|^10.0.0
- symfony/var-dumper: ^v5|^v6
This package is auto-updated.
Last update: 2025-03-27 13:22:17 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();