Laravel 6 ships with improved support for Eloquent subqueries, thanks to a few PRs from Jonathan Reinink. You may now add subqueries by using the new
addSelect() method, or by passing a closure to the
from() methods of the query builder. I'll show you how in this lesson.
Published on Sep 11th, 2019.