I don't understand the "grouping by weeks", is that week number by month (or year) or week_date? And with this kind of selecting, I'd rather use raw sql instead (DB::query()). Something like:
select week(time) as week_select from <table> group by week_select;
Or using mysql TimeDiff function. The worst case is you have to pull all data and process it manually by php, which is of course more freedom.
My hope is that I can do it with the same dataset.
As for week number by month, vs week_date, I know ideally i'd want week number. However, with what i've been playing around with carbon combined with goofy loops, I'm not sure I can get that.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community