1
I’m trying to turn this SQL from the postgres below to the eloquent in the laraval someone has an idea of how it would look?
select
g.id as group_id,
max(g.name) as name,
max(g.created_at) as created_at,
count(ag.asset_id) as veichele
from "groups" g left join assets_groups ag on g.id = ag.group_id
group by g.id;