Answer the question
In order to leave comments, you need to log in
Is it possible in laravel to get an array through the query builder where the number of rows would be contained and the field by which it would be combined?
In general, here is a sql query, where in_week is a non-unique, random, repeating number.
SELECT in_week, count(*) FROM hour GROUP BY in_week;
Answer the question
In order to leave comments, you need to log in
QueryBuilder::get returns a collection that you can run through https://laravel.com/docs/5.8/collections#method-ma... and get what you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question