Skip to content

Support Model::select() forward call #216

@caugner

Description

@caugner

Is your feature request related to a problem? Please describe.
Psalm seems to be unable to infer the type of the following assignment:

$users = User::select('name', 'email');

(The correct type would be Illuminate\Database\Eloquent\Builder<User>.)

Describe the solution you'd like
Support this syntax.

Describe alternatives you've considered
Workaround is to call User::query()->select('name', 'email') directly.

Additional context
(None.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions