eastwest / eloquent-to-raw-sql
This is my package EloquentToRawSql
v1.0.1
2021-07-24 17:55 UTC
Requires
- illuminate/contracts: ^5.7|^5.8|^6.0|^7.0|^8.0
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