topclaudy / compoships

Multi-columns relationships for Laravel's Eloquent ORM
MIT License
1.12k stars 132 forks source link

Add support for associate method in BelongsTo class. #101

Closed pedrofmj closed 4 years ago

pedrofmj commented 4 years ago

Support for method associate($model) in BelongsTo Relationships. Before this fix, when we tried to call associate in a belongsTo, it was calling the original associate($model) from Illuminate\Database\Eloquent\Relations\BelongsTo, what was causing errors.

topclaudy commented 4 years ago

Thanks @pedrofmj. Can you please add tests for this?

pedrofmj commented 4 years ago

Thanks @pedrofmj. Can you please add tests for this?

Sure. I'm adding the test case right now.

pedrofmj commented 4 years ago

Thanks @pedrofmj. Can you please add tests for this?

Sure. I'm adding the test case right now.

Done!

topclaudy commented 4 years ago

Released in 2.0.5. Thanks :)