How to enable query log in laravel?

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) Example DB::connection()->enableQueryLog(); $result = User:where(['status' => 1])->get(); $log = DB::getQueryLog(); dd($log);

Popular posts from this blog

Ajax Toggle(on/off) on-click Update

Yii Framework In Update Time View Image In Form