staudenmeir / eloquent-has-many-deep

Laravel Eloquent HasManyThrough relationships with unlimited levels
MIT License
2.67k stars 157 forks source link

Support for laravel ide-helper #86

Closed efinder2 closed 4 years ago

efinder2 commented 4 years ago

Thank you for this great library in advance. This library would be even better if it supported the laravel/lumen ide-helper. It breaks the workflow to create the php-doc for the hasManyDeepFromRelations relations by hand. It would be much easier if they were automatically generated.

staudenmeir commented 4 years ago

How do you mean? What would I need to do to support the IDE helper?

efinder2 commented 4 years ago

I've digged into their code. Is not possible to extend the list of supported relation types. This is currently a hard coded mapping array from return type class name to relation.

In two weeks I have some free days. Then I'll create a pull request on their end to make it possible to extend this array by the new relation types. I'll reopen this when done.

efinder2 commented 4 years ago

The pull request under development: https://github.com/barryvdh/laravel-ide-helper/pull/987