cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

add the getMorphClass() function #70

Closed phpcxy closed 6 years ago

phpcxy commented 6 years ago

Thank you for helping to make this package better!

Please make sure you've read CONTRIBUTING.md before submitting your pull request, and that you have:

Thank you!

cviebrock commented 6 years ago

Can you explain what this change does, rather than using static::class?

phpcxy commented 6 years ago

@cviebrock https://laravel.com/docs/5.5/eloquent-relationships#polymorphic-relations If i define the Custom Polymorphic Types, this function can get the custom name instead of the class name.

cviebrock commented 6 years ago

Thanks!