Support the ongoing development of Laravel.io →
Database Eloquent

Hi,

I am building a report system and we need to make overviews, statistics and others like that.

User:
Selects an interval ($start - $end). The format is like 2014/07

Baclend:
If (for example) the both the $start and the $end is 2014/07, we have to get all the rows created in July of 2014.

Any tips how can I do that with Eloquent?

Thanks, B.

Last updated 2 years ago.
0

did you store your date as timestamp?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

balintant balintant Joined 2 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.