https://github.com/laravel/framework/pull/42690
// before...
User::with([
'avatar',
'posts.tags',
'posts.author',
'posts.featureImage',
'posts.comments.tags' => fn ($q) => $q->latest(),
])->get();
// after...
User::with([
'avatar',
'posts' => [
'tags',
'author',
'featureImage',
'comments' => [
'tags' => fn ($q) => $q->latest(),
],
],
])->get();
Top comments (1)
What on earth is Nasted array