how to get last value in query in laravel 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();