last executed query in laravel code example
Example 1: print last query laravel
DB::enableQueryLog();
dd(DB::getQueryLog());
Example 2: enablequerylog laravel
\DB::enableQueryLog();
dd(\DB::getQueryLog());
DB::enableQueryLog();
dd(DB::getQueryLog());
\DB::enableQueryLog();
dd(\DB::getQueryLog());