plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature Request]: Ability to autocomplete dynamic relationships

Open inovar-tecnologia opened this issue 2 years ago • 5 comments

Feature Description

Ability to autocomplete relationships created with Model::resolveRelationUsing

https://laravel.com/docs/9.x/eloquent-relationships#dynamic-relationships

inovar-tecnologia avatar May 06 '22 13:05 inovar-tecnologia

Hello. Could you share the code where you are using it? I suppose I can't help in that case, because I don't run PHP code, so I couldn't understand the model class and relation name...

adelf avatar May 12 '22 12:05 adelf

Creating a dynamic relationship 'nicknames'

image

make autocomplete for this cases:

image

image

image

inovar-tecnologia avatar May 12 '22 14:05 inovar-tecnologia

Why don't you add this relation in the Branch class? resolveRelationUsing is for dynamic relations, when class or relation name is dynamic, so they can't be added as a class method...

adelf avatar May 13 '22 11:05 adelf

Branch belongs to another composer package, it cannot be changed

inovar-tecnologia avatar May 13 '22 11:05 inovar-tecnologia

Ok. Got it. Thank you.

adelf avatar May 13 '22 11:05 adelf