emfpc
1 week ago

Only get the count() of the current month

Posted 1 week ago by emfpc

Trying to get the count of a table but only from the current month. Example, in the table i got 10 tickets made between sep and oct. I just want to have the count of all the tickets created in octuber and when we move to nov it will only display the ones created in nov. This is has far has i got:

$ticketsCount = DB::table('tickets')->count('created_at');

Please sign in or create an account to participate in this conversation.