Google News
logo
Laravel - Interview Questions
How to enable query log in Laravel ?
Use the enableQueryLog method to enable query log in Laravel
DB::connection()->enableQueryLog(); 
You can get array of the executed queries by using getQueryLog method:
$queries = DB::getQueryLog();
Advertisement