Laravel - Getting Started - Subquery Ordering

In addition, the query builder's orderBy function supports subqueries. Continuing to use our flight example, we may use this functionality to sort all destinations based on when the last flight arrived at that destination. Again, this may be done while executing a single database query:

    return Destination::orderByDesc(
            ->whereColumn('destination_id', '')