public function allPendingBySource() { return PendingLead::groupBy('lead_source')->groupBy('type')->get([DB::raw('source as lead_source'), DB::raw('lead_type as type'), DB::raw('count(*) as count')]); }