Commit

7cfd95c

Did you know Laravel's chaperone() method can help prevent **inverse N+1 query problems** when working with Eloquent relationships?
php
// app/Models/Post.php
public function comments(): HasMany
{
    return $this->hasMany(Comment::class)
        ->chaperone(); // Fixes the inverse N+1
}
Usage:
php
$posts = Post::with('comments')->get();

foreach ($posts as $post) {
    foreach ($post->comments as $comment) {
        echo $comment->post->title;
        // No extra query per comment!
    }
}
New format? @MrPunyapal

commit 7cfd95c

Ah, I use the same for all apps, so let's see, the same is possible with Pinkary, but it's crazy to cross-post stuff after that, like you maintain different copy for different platforms...