laravel/laravel — pull request #1433 by denaje (2012-11-09 00:50:35+00:00)
Title: Allow sync() to specify $attributes per id

This is a more robust implementation of https://github.com/laravel/laravel/pull/1424

Eloquent's Has_Many_And_Belongs_To->sync() accepts either a flat array of IDs, or an associative array of $id->$attributes, where $attributes is itself an associative array of attributes to apply to the pivot table.