Within a Eloquent model named Workorder I defined a local scope using the Illuminate\Database\Eloquent\Attributes\Scope attribute:

Note that it is a protected and non-static function. When I implement the scope accordingly, as one of Laravel's magic tricks, namely as a public static function, vscode gets confused and gives a warning:

The scope works by the way. Here you can find the relevant documentation.