Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode undefined function toastr() #34

Open
ahmaruff opened this issue Feb 18, 2023 · 2 comments
Open

vscode undefined function toastr() #34

ahmaruff opened this issue Feb 18, 2023 · 2 comments

Comments

@ahmaruff
Copy link

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:

  1. install toastr via composer
  2. 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
@yoeunes
Copy link
Owner

yoeunes commented Feb 18, 2023

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.');

@ahmaruff
Copy link
Author

ahmaruff commented Feb 18, 2023

thanks for your suggestion @yoeunes, but it still display error Undefined function 'toastr'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants