dimanche 17 avril 2022

Operation count different id's

i need to do this operation:

introducir la descripción de la imagen aquí

Count the total of each number of records with a different 'rrpp': 1,2,3,4 ∞

I always use this to sum the records of a RRPP:

  $variable = Modelo::where('dia_id' , $request->id)->where('rrpp' , 1)->count('id');

but this way I only get the result of 1 in specific. And what I need is to get the result like this

help, thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire