eastwest/eloquent-to-raw-sql

This is my package EloquentToRawSql

v1.0.1 2021-07-24 17:55 UTC

This package is auto-updated.

Last update: 2024-04-29 04:53:38 UTC


README

Output the full, unparameterized query in Laravel so you can paste it right into your database GUI.

All credit goes to @therobfonz and https://gist.github.com/BinaryKitten/2873e11daf3c0130b5a19f6b94315033

Example:

$user = User::where('id', 1)->toRawSql();


dump($user);

// "select * from `users` where `id` = 1"

How to install

composer require eastwest/eloquent-to-raw-sql