Level 24
Have you tried anything?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi i want to make this sql query with laravel eloquent way any ideas.
SELECT au.id au_id, ar.id ar_id, ar.created_at ar_created_at FROM authors au LEFT JOIN articles ar ON au.id=ar.author_id INNER JOIN (SELECT author_id, max(created_at) max_c from articles group by author_id) g ON g.author_id=au.id AND g.max_c=ar.created_at ORDER BY ar_created_at DESC
Please or to participate in this conversation.