laravel 使用DB 鏈接leftJoin查詢
1 $product_count = DB::table('fook_platform_orderrefund as a') 2 ->leftJoin('fook_platform_orderinfo as i','a.orderinfo_id', '=' ,'i.id') 3 ->whereBetween('a.refund_time',[date('Y-m-d 00:00:00', strtotime("-$i days")), date('Y-m-d 23:59:59', strtotime("-$i days"))]) 4 ->count("a.id");