bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
https://bosnadev.com
825 stars 235 forks source link

Call to undefined method Illuminate\Database\Query\Builder::sync() #48

Closed fer-ri closed 9 years ago

fer-ri commented 9 years ago

Hi.. i have code like this where attachments is morphMany

$update = $this->repository->updateRich($input, $id);

$update->attachments()->sync($attachmentIds);

But its throws Call to undefined method Illuminate\Database\Query\Builder::sync()

Seems like its should return an instance of Illuminate \ Database \ Eloquent \ Model

Any idea?

Thanks

fer-ri commented 9 years ago

Ah my bad .. sync not available for morphMany relation .. sorry .. :+1: