Open burtgithub opened 3 years ago
@mfn Please help me ,thank you
Yeah I guess that's not supported.
As you may or not may be aware, you can only "declare" a method with a name either static or not.
Right now the _ide_helper.php generates stubs for the static versions:
Trying to have both results a) in an error in the IDE (not at runtime, because the file is not executed) and b) only one of them (the first entry) working anyway:
The most common case is, AFAIK, to use Model::firstOrCreate()
but yes, technically ->
is valid.
So either use the ::
version or, if you can't, you're currently out of luck regarding error in PhpStorm.
At least, I don't know a way to teach this to PhpStorm.
I created a test demo in Github
My environment
My steps
Create two test files
1:laravel-ide-helper-test/app/Http/Models/TestDemo.php
2 /laravel-ide-helper-test/app/Http/Controllers/TestController.php
I don't know if I made a mistake or if I missed something