Home > Mobile >  How to Enable query log in Laravel?
How to Enable query log in Laravel?

Time:09-24

Query log Enable in Laravel With Example

DB::connection()->enableQueryLog();

CodePudding user response:

DB::connection()->enableQueryLog();



$result = User:where(['status' => 1])->get();



$log = DB::getQueryLog();



dd($log);
  • Related