You can use Eloquent has()
function to query relationships even two layers deep!
// Author -> hasMany(Book::class);// Book -> hasMany(Rating::class);$authors = Author::has('books.ratings')->get();
Only until Jan 16th: coupon RESOLUTION25 for 40% off Yearly/Lifetime membership!
Read more hereYou can use Eloquent has()
function to query relationships even two layers deep!
// Author -> hasMany(Book::class);// Book -> hasMany(Rating::class);$authors = Author::has('books.ratings')->get();