yoeunes / toastr

:eyes: toastr.js notifications for Laravel
https://php-flasher.io
MIT License
375 stars 52 forks source link

vscode undefined function toastr() #34

Open ahmaruff opened 1 year ago

ahmaruff commented 1 year ago

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):

Additional context

yoeunes commented 1 year ago

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 commented 1 year ago

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