Closed rodrigoguariento closed 4 years ago
Have you tried running this example? sayHello
is protected
.
Have you tried running this example?
sayHello
isprotected
.
Thanks! I've reviewed my code.
Undefined method 'can'.intelephense(1013)
public function shouldBeDisplayed() { return Auth::user()->can('browse', Voyager::model('Page')); } }
An error occurred in the (can) method
hellp hellp
Undefined method 'can'.intelephense(1013)
same problem
Undefined method 'can'.intelephense(1013)
gets triggered by this code:
if (!Auth::user()->can('all-clients')) { return; }
but the code runs fine.
I have the same problem but I still don't know how to solve. Is there any option in setting.json that should be changed?
I installed barryvdh/laravel-ide-helper and ran php artisan ide-helper:generate
and that seems to have solved it for me. I am using VS Code.
I had the same problem that the method worked but it gave me the error, what I did was uninstall the "PHP Intelephense" plugin.
I have same problem.
help me please.
go setting settings json
and paste
"intelephense.telemetry.enabled": false, "intelephense.completion.triggerParameterHints": true, "intelephense.completion.insertUseDeclaration": true, "intelephense.trace.server": "messages", "intelephense.diagnostics.undefinedClassConstants": false, "intelephense.diagnostics.undefinedFunctions": false, "intelephense.diagnostics.undefinedConstants": false, "intelephense.diagnostics.undefinedProperties": false, "intelephense.diagnostics.undefinedTypes": false, "intelephense.diagnostics.undefinedMethods": false,
Maybe we could just add an ignore next line to check?
Mm, seems that is already possible:
/** @disregard [OPTIONAL CODE] [OPTIONAL DESCRIPTION] */
https://github.com/bmewburn/vscode-intelephense/issues/568#issuecomment-1763662245
I have the same issue, So I got rid of the PHP Intelephense extension
with a old version
Describe the bug
To Reproduce
Expected behavior The method exists and works in this structure.
Platform and version Ubuntu 18.04LTS + VSCode 1.49.0 + PHP Intelephense v1.5.4
Thank you.