Skip to content

[Bug]: No autocompletion on nested relations using load() if using nested arrays #1336

@Tristan-MyAnaPro

Description

@Tristan-MyAnaPro

Bug description

Hello !

With a combination of model like this :

Root -> hasMany -> SubModelLevel1 -> hasMany -> SubModelLevel2

Laravel Idea has no problem auto completing nested array of relation when using the with() method :

Image

It works if we use Root::with() or Root::query()->with() without any problem :

Image

However, this doesn't work for the load() method :

Image

Loading sub relations with dot notation works fine :

Image

However, it's not always practical when the number of sub relation and their own sub relations grow.

Thanks in advance for the fix, I'd love to be able to use with() and load() the same way ! :)

Tristan.

Plugin version

12.3.0.253

Operating system

Linux

Steps to reproduce

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions