Query with select and count in laravel
I did this Query in SQL but I can’t make it work in Eloquent.
Please help me.
SELECT
tags.desc,
COUNT(planificacion_info.id_area) as cantidad_intervenciones
FROM
tags
INNER JOIN planificacion_info ON planificacion_info.id_area = tags.id_tag
WHERE
tags.grupo = 'area' and tags.estado = true
GROUP BY
tags.desc
from Laravel Questions and Answers https://laravelquestions.com/laravel/query-with-select-and-count-in-laravel/
via Lzo Media
No comments:
Post a Comment