Example 1:
public function querylog() { DB::enableQueryLog(); $product = Product::find(2); $last_query = DB::getQueryLog(); dump($last_query); }
Please log in to report spam or off-topic articles. This helps us prevent report abuse and keep the engineering community clean.