Refer from link: http://laragems.com/post/a-quick-way-to-display-a-sql-query-in-tinker
Please enter tinker command: php artisan tinker
Type below code:
DB::listen(function ($query) {
dump($query->sql);
dump($query->bindings);
dump($query->time);
});
And from above line on, every ORM manipulation you type will show what transformed SQL is.