Use the enableQueryLog method: Use the enableQueryLog method:
DB::connection()->enableQueryLog();
You can get an array of the executed queries by using the getQueryLog method:
$queries = DB::getQueryLog();
This post is submitted by one of our members. You may submit a new post here.
Laravel interview Questions © 2019 - Designed by PSD to HTML