toastr
toastr copied to clipboard
vscode undefined function toastr()
Describe the bug
vscode display error
Undefined Function 'App\Http\Controllers\toastr'
but it works in browser. (just showing unnecessary error in vscode)
i don't know if this is bug or not. but maybe any suggestion to get rid off this error?
To Reproduce Steps to reproduce the behavior:
- install toastr via composer
- use
toastr()function in any controllers
Expected behavior there is no error in vscode terminal
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Firefox
- VS Code 1.74.3
- Laravel 9
Additional context
- toastr v2.3
Hello @ahmaruff, actually this is not an error in PHP, just ignore it or try to use \ and see if the error disappears:
\toastr()->success('Your form has been submitted.');
thanks for your suggestion @yoeunes, but it still display error Undefined function 'toastr'.