InterviewSolution
Saved Bookmarks
| 1. |
How to enable query log in laravel? |
|
Answer» Our FIRST step should be DB::connection()->enableQueryLog(); After our query, it should be PLACED $querieslog = DB::getQueryLog(); After that, it should be placed dd($querieslog) ExampleDB::connection()->enableQueryLog(); $RESULT = User:where(['status' => 1])->GET(); $log = DB::getQueryLog(); dd($log); |
|