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.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.