In Eloquent hasMany()
relationships, you can filter out records that have X amount of children records.
// Author -> hasMany(Book::class)$authors = Author::has('books', '>', 5)->get();
In Eloquent hasMany()
relationships, you can filter out records that have X amount of children records.
// Author -> hasMany(Book::class)$authors = Author::has('books', '>', 5)->get();