Menu

Sunday, April 7, 2019

Laravel Eloquent Display Query Log

First you have to enable query log it can be done using
=> DB::enableQueryLog();
then you can use below code to see the query log
=> dd(DB::getQueryLog());
Example :-
public function store(Request $request) { DB::enableQueryLog(); $from = StockMaster::first(); dd(DB::getQueryLog()); }
Output :-

No comments:

Post a Comment

MongoDB Sample Solution

1st CIE Paper INSERT :- No Documents / Queries 1 db . bus_master . insert ({     "_id" : 1 ,    ...