How to Output Raw SQL Queries in Laravel 5

By default query log is disabled in Laravel 5

You need enable query log by calling

DB::enableQueryLog();

To output to the screen the last queries ran you can use this

dd(DB::getQueryLog());

Have something to Add?

Loading Facebook Comments ...
Loading Disqus Comments ...