Count data from a column with today's date [duplicate]

I am counting the number of values in the column "asistencia", but I want you to count only those of today.

Database: https://i.imgur.com/AfHvNB9.png

To count the column "Asistencia" use:

    $asistencias = Eventos::whereNotNull('asistencia')->count();
$carbon=Carbon::now();

to get today I use Carbon How can I count today's data? with column crated_at

I could use this but how do I count the data in the 'asistencia' column?

$posts = Eventos::whereDate('created_at', Carbon::today())->get();



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

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery