psalm-plugin-laravel icon indicating copy to clipboard operation
psalm-plugin-laravel copied to clipboard

Support Model::select() forward call

Open caugner opened this issue 3 years ago • 0 comments

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.)

caugner avatar Jan 21 '22 16:01 caugner