mercredi 14 juillet 2021

Count today's records

I need to count only today's records

   public function sales()
{

    $h = Carbon::now(); 
    $recordstoday = Eventos::All();


    $data = [
        'category_name' => 'dashboard',
        'page_name' => 'sales',
        'has_scrollspy' => 0,
        'scrollspy_offset' => '',
    ];

    return view('dashboard',compact('recordstoday','h'))->with($data);
}

right now it counts all, but i need you to count today's records, to get today use Carbon

 <h4 class="card-text text-center"><b></b></h4>


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

Aucun commentaire:

Enregistrer un commentaire