laravel-ardent / ardent

Self-validating, secure and smart models for Laravel's Eloquent ORM
BSD 3-Clause "New" or "Revised" License
1.39k stars 211 forks source link

morphTo() seems to be returning belongsTo() #270

Open igorsantos07 opened 9 years ago

igorsantos07 commented 9 years ago

This should be investigated. Discovered accidentally on https://github.com/mspivak/ardent/commit/1228dfe7eee662fa0b41a34aa82212ce9b7b0f62 / #227 (that would fix only #211).

Ideally the original Eloquent method should be verified and the two methods should then be merged correctly.

igorsantos07 commented 9 years ago

Aparently this bug was spotted by @thinksaydo as well.