📅  最后修改于: 2022-03-11 14:54:47.194000             🧑  作者: Mango
$user = User::find(1);
$user->roles()->updateExistingPivot($roleId, [
'active' => false,
], false);
//The last param is to not update time updated_at column timestamp.