11/9/2023 0 Comments Phpstorm laravel orderby not foundOr he may tell you what else you need to do/add in your class to have such methods get recognized.īut before that, if you have not done it yet, please check the plugin docs - you may have missed an extra step to have such code recognized. If after checking all that he say "all good on my end, it's PhpStorm that messing up/gets confused later" then it will need to be reported to PhpStorm Issue Tracker. This can be useful for cases where you want to take advantage of PhpStorm's support of the /: all files placed there are parsed, should you want to provide additional files to PhpStorm. Whats a bit confusing here is the icon used for methods - its abstract/interface icons. ![]() Thing is: IlluminateDatabaseEloquentModel class does not have 'where()' method - it comes from IlluminateDatabaseEloquentBuilder. Check in Settings -> Inspections -> PHP -> Undefined This will not let you click on the method, but merely disables the annoying markup by as it states, downgrading severity. My suggestion is: make up an example code (so it can be copy-pasted and checked on another machine) and contact the plugin author. Back in the fragment above, the where method, which Account inherits from Model, is highlighted as not-found and generates a PHP warning in Phpstorm. There is also an option in phpStorm to downgrade severity if magic methods are present in class. ![]() Such magic resolving is what Laravel specific plugin does (should do). 1 composer require -dev barryvdh/laravel-ide-helper. I'm having issues with PhpStorm not recognizing some methods on Eloquent\Builder (whereNull, orderBy etc. where() is provided by the QueryBuilder, not Model it gets dynamically resolved/routed by Laravel at runtime only. phpstorm laravel helpers actions not found 335. Where() and whereUserId() are not native methods of the Model class. If plugin reports that some method returns incorrect/no type at all/mixed type in the first place then what PhpStorm can do here? The completion for Laravel magic methods (and how that magic gets resolved into the concrete types) is done by that plugin. When I switched to use MAMPs PHP installation, all the issues disappeared. In my case, I was running PHPUnit using OSXs default PHP installation, but running my dev site with a PHP installation created by MAMP. I suggest you check it with Laravel Idea plugin author. In PHPStorm settings, you can navigate to Languages & Frameworks > PHP to check what installation of PHP its choosing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |