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();
Only until Jan 16th: coupon RESOLUTION25 for 40% off Yearly/Lifetime membership!
Read more hereIn 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();