DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
496 stars 52 forks source link

[Feature] static functions #507

Closed vatsake closed 1 year ago

vatsake commented 1 year ago

Environment:

I'm using the devsense plugin for vscode - It displays error and such. Some methods get the following error: image

stevebauman commented 1 year ago

Hi @vatsake,

This is expected and is not a bug. If you'd like to preserve IDE type-hints, you must call the static query() method on the model:

use LdapRecord\Models\ActiveDirectory\User;

User::query()->where('...')