Query with select and count in laravel - development

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

Comments

Popular posts from this blog

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

Using Intervention package to compress images. My images are not being compressed, still the same size - development

ionic2 Angular2 import/export JSON data