Answers for "how to create a record in many to many relationship laravel using eloquent"

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 "how to create a record in many to many relationship laravel using eloquent"

Browse Popular Code Answers by Language