Answers for "laravel eloquent many to many query using whereHas"

PHP
0

laravel eloquent many to many query using whereHas

$dogs = Dog::whereHas('owners', function($q) use($ownerIds) {
    $q->whereIn('id', $ownerIds);
})->get();
Posted by: Guest on August-06-2021

Code answers related to "laravel eloquent many to many query using whereHas"

Browse Popular Code Answers by Language