stancl/laravel-hasmanywithinverse
Laravel's hasMany leaves the inverse relation unset, so accessing the parent from each child triggers extra queries. This package adds hasManyWithinverse, which hydrates the inverse automatically—so $child->parent is already loaded without N+1.
How can I help you explore Laravel packages today?