📅  最后修改于: 2022-03-11 14:53:55.790000             🧑  作者: Mango
代码示例2
//id for single
$user->reasons->attach($reasonId);
//array for multiple
$user->reasons->attach($reasonIds);
$user->save();