Skip to content
Advertisement

How to count the rows by created date in Laravel query builder?

I am trying to count the rows by created_at like

JavaScript

So I can show the client like in 2017-07-10, there are 8 people signed up. In 2017-08-13, there are 5 people signed up or something like that.

Here is what I tried,

JavaScript

but this is just showing only the number.

Advertisement

Answer

You could try something like this:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement