Commit 712c88a6 authored by Jens Segers's avatar Jens Segers

Fix ids being converted to int

parent 4526972e
......@@ -126,7 +126,9 @@ class BelongsToMany extends EloquentBelongsToMany {
{
$this->detach($detach);
$changes['detached'] = (array) array_map(function ($v) { return (int) $v; }, $detach);
$changes['detached'] = (array) array_map(function ($v) {
return is_numeric($v) ? (int) $v : (string) $v;
}, $detach);
}
// Now we are finally ready to attach the new records. Note that we'll disable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment