Having issues getting php storm to know about the methods #147
-
For some reason only 4 of the methods on the blueprint are caught/known by php storm. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Your IDE doesn’t recognize all Blueprint methods because they're added with macros, which aren't visible to static analysis. Laravel IDEA and Barryvdh IDE Helper can’t detect them automatically. You did the right thing by writing a stub. Just include all custom methods in the stub, link it to Blueprint, and regenerate the helper files. This will fix autocomplete issues... |
Beta Was this translation helpful? Give feedback.
-
you need to create a custom stub file where all macro methods like magellanPoint2D, magellanBox2D, etc. are manually defined. This stub file should be written inside the Blueprint class namespace and each method should be defined using either @method annotations or static functions. Then, open the config/ide-helper.php file and add the path to your custom stub file under the extra option so that the helper includes it. Clear caches |
Beta Was this translation helpful? Give feedback.
Your IDE doesn’t recognize all Blueprint methods because they're added with macros, which aren't visible to static analysis. Laravel IDEA and Barryvdh IDE Helper can’t detect them automatically. You did the right thing by writing a stub. Just include all custom methods in the stub, link it to Blueprint, and regenerate the helper files. This will fix autocomplete issues...