Answers for "save multiple id in pivot table"

0

save multiple id in pivot table

$game->users()->attach($user->id); // add user
$game->users()->attach([1,3,7]); // add multiple users via an array of IDs
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language