laravel/framework — pull request #3625 by adamwathan (2014-02-20 20:44:34+00:00)
Title: Added support for syncing a collection of models instead of just IDs

Currently with a belongsToMany relationship, you can only `sync` an array of IDs, but can `attach` a model OR ID.

Other relationships in Laravel tend to use a model when inserting (`$user->posts()->save($post)` rather than `$user->posts()->save(1)`) so it seemed in the interest of consistency to allow passing a collection of models to sync on a belongsToMany relationship in addition to just passing an array of IDs.