DB::connection('mysql_wm')->enableQueryLog();
$activity = Reward::where('store_id', $store->id)
->where('end_at', '>=', $today_date)
->when($id, function ($query) use ($id) {
$query->where('id', '<>', $id);
})
->where(function ($query) use ($multi_store_ids) {
if ($multi_store_ids) {
$query->where('all_multi_store_id', 1)
->orWhereHas('rewardMulti', function ($qry) use ($multi_store_ids) {
$qry->whereIn('multi_store_id', $multi_store_ids);
});
};
})
->get();
$log = DB::connection('mysql_wm')->getQueryLog();
lavarel - 日誌打印
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.