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