See my last answer here https://laracasts.com/discuss/channels/laravel/how-to-find-only-last-row-from-second-table-along-with-its-first-table-row?page=1
More than one way, one is starting with select, another starts with query.
Bottom line, it can take some trial and error to build up eloquent queries.
Is this the correct way of rewriting this query in Eloquant?
That's QB you are using, but would be similar in eloquent.
Again, eloquent has QB's methods also built in, joins, group by, etc.