$January = $articles->whereMonth('updated_at','01')
->whereYear('updated_at', $year)
->get();
$February = $articles->whereMonth('updated_at','02')
->whereYear('updated_at', $year)
->get();
If there is no data in $January, then an empty array is written to $February regardless of the data availability. Tell me how to fix it and why is this happening?
Aucun commentaire:
Enregistrer un commentaire