Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

theUnforgiven's avatar

Working with date & graphs

I'm building a system which tracks the amount of visits on a daily basis, so a couple of questions.

How can I make it so that it tracks visits once per day then I can show these in a graph which i have working currently just the dates thing I can't seem to figure out. So it would need to enter a new line in the database with the new day and the amount of visits if that makes sense.

0 likes
2 replies
theUnforgiven's avatar

Or on a monthly basis and show the amount of visits per month would also be ideal.

How would I achieve this?

jajajaime's avatar

You could create an Artisan Command that is run by a cronjob every day at 12am, for example. This command will do the calculations of your visitors and insert the data in your DB table.

Please or to participate in this conversation.