When I tried to fill a model, I get a PHP error saying fillBelongsToRelation expects as second parameter an array, object passed.
Seeing the code, I found the method sign force the second parameter be an array, but in method body checks if is a Model.
I propose to change method signature without type-hinting as array the second parameter, and specify in PHPDoc that the second parameter can be array or Model.
Thanks for the PR. I agree, it should be possible to pass an object instance. I've added a few tests to cover the change you've made, and I'm merging both to master.
When I tried to fill a model, I get a PHP error saying
fillBelongsToRelation
expects as second parameter an array, object passed.Seeing the code, I found the method sign force the second parameter be an array, but in method body checks if is a Model.
I propose to change method signature without type-hinting as array the second parameter, and specify in PHPDoc that the second parameter can be array or Model.