How To Get Last Executed Query In Laravel

[Solved] How To Get Last Executed Query In Laravel | Php - Code Explorer | yomemimo.com
Question : print last query laravel

Answered by : saptarshi-mondal

DB::enableQueryLog();
dd(DB::getQueryLog());

Source : | Last Update : Fri, 14 Aug 20

Question : How to Get Last Executed Query in Laravel

Answered by : attractive-ant-xmndcaunpqd4

DB::enableQueryLog();$user = User::get();$query = DB::getQueryLog();print_r($query);

Source : https://www.itsolutionstuff.com/post/how-to-get-last-executed-query-in-larave-5example.html | Last Update : Wed, 13 Oct 21

Answers related to how to get last executed query in laravel

Code Explorer Popular Question For Php