jeudi 4 avril 2019

Is there way to get counts of every day of week by created_at in laravel php

while iam fetching created_at field by using whereDay iam getting this result ?

"months": ["Thu"] "rq_count_data": [12] enter image description here

but i need all week days if Monday has no counts it has to put 0 on its position of array element likely bellow

"months": ["Mon","Tue","Wen","THU","Fri","Sat"],

"rq_count_data":["0","0","0","12","0","0"],

how can i work like this please help me regarding this...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire