0
在我的app/config/app.php文件中,我打開了'debug'=>true
。 我試圖Laravel 4:如何顯示SQL查詢運行?
//run eloquent functions
$allMessages = Messages::with('User')->whereIn('conv_id',$conv_id)->orderBy('created_at','aadesc')->take(10);
$q= DB::getQueryLog();
dd($q);
但它返回一個空數組。所以我猜想按照建議做end($q)
是沒用的。
我也嘗試了可接受的answer to a question並將其添加到我的路線文件的末尾,但沒有任何發生。我對Laravel仍然很陌生,需要一些指導。謝謝!
謝謝!欣賞它。 :) – Mark