lundi 16 août 2021

add records from a particular month

I need to add the records for the month of July.

My code: now I can only add the records of the current month

$cobrosm = Cobros::whereBetween('created_at',[
            $carbon->startOfMonth()->toDateString(),
            $carbon->endOfMonth()->toDateString()
       ])->sum('importe');

help pls



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire