Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce97199

Browse files
committed
Use array_map.
1 parent 5e87df1 commit ce97199

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ public function sync(array $ids, $detaching = true)
584584
{
585585
$this->detach($detach);
586586

587-
$changes['detached'] = (array) array_walk($detach, 'intval');
587+
$changes['detached'] = (array) array_map('intval', $detach);
588588
}
589589

590590
// Now we are finally ready to attach the new records. Note that we'll disable

0 commit comments

Comments
 (0)