Level 51
YourModel::where('carId', $carId)->count();
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to find a way to execute this query: SELECT carId, COUNT(1) FROM event_dataGROUP BYcarId ORDER BY COUNT(1) DESC but with Models, i didn't find anything in docs so i came here
Please or to participate in this conversation.