Skip to content

Laravel service provider to dump query string, with merged bindings, from anywhere in the query chain.

License

Notifications You must be signed in to change notification settings

ApeWare/laravel-dd-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-dd-sql

Laravel service provider to dump query string, with merged bindings, from anywhere in the query chain.

This package is no longer being supported so I can not guarantee it will continue to work in newer versions of Laravel. Last tested in Laravel 5.

Usage

orderByRandom

Model::where('foo', '=', 'bar')
    ->where('this', '>' 'that')->ddSql()   //<----dumps query string before the orderBy
    ->orderBy('foo', 'desc')
    ->get();

outputs

select * from model where `foo` = `bar` and `this` > `that`

Installation

Add the ApeWare\BuilderMacros\DdSqlServiceProvider service provider in config/app.php.

Code Structure

├── src
│   └── DdSqlServiceProvider.php
├── .gitignore
├── LICENSE.txt
├── README.md
└── composer.json

License

This package is open-sourced software licensed under the MIT license.

About

Laravel service provider to dump query string, with merged bindings, from anywhere in the query chain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages