distinct() on specific column is not working in laravel?

I am trying to get rows where rate_card_id is different but is not working.

 $distinct_rows = RateCharge::where('customer_charge_id',$customer_charge_id)->distinct('rate_card_id')->get();

it is fetching all the rows where customer_charge_id matched.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3c6agRn
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time