您好,我正在尝试执行此查询 $collections = Collection::groupBy(['branch_office_id', DB::raw('MONTH(`created_at`)')])->sum('gross_amount')->paginate(10); 但它显示以下错误: Call to a member function paginate() on string 所以我想知道怎样才能在不丢失分页函数的情况下做
SELECT payment_type, sum(total_received) FROM payments GROUP BY payment_typePayment::all()->groupBy('payment_type')->sum('total_received')
以雄辩的口才给我的绝对什么都没有。什么是
如何将以下Laravel查询生成器转换为雄辩? ->select('offer_name', DB::raw('offer_name as offers, COUNT(id) as clicks, SUM(IF(status = 1, 1, 0)) as lead, SUM(IF(status=1, payout, 0)) as earnings'))