Reputation: 193
As you know, we can use the method DB::getQueryLog()
to print the sql statement in Laravel 4.
But it doesn't work in Laravel 5.
Upvotes: 0
Views: 1503
Reputation: 10103
if you want to see the currently running SQL query you can use this
https://github.com/itsgoingd/clockwork
installation instructions are clearly mentioned in the README file
Upvotes: 1
Reputation: 9649
Query log is disabled by default in L5. Call
DB::connection()->enableQueryLog();
$queries = DB::getQueryLog();
before trying to log it. See the docs for more info .
Upvotes: 1