laravel last query get' code example
Example 1: print last query laravel
DB::enableQueryLog();
dd(DB::getQueryLog());
Example 2: laravel get last record
Model::latest()->first();
DB::enableQueryLog();
dd(DB::getQueryLog());
Model::latest()->first();