Open BoGnY opened 9 months ago
The controversy of which is "cleaner", facades or static methods :)
That's part of the reason why for IDEs and for shorter code (both the library and its usage), I opted for the easier toast() and did not document the facade way of doing it as you did.
I'll add them if I get more requests for this.
Yes ^^ I personally prefer Facade on php files and helper on blade files, but obviously the choice remains up to the dev. I found somewhere that this is more recommended.
I hope others are interested ^^ Also because a few lines of documentation simplifies the use of the Facade :)
Hmm. Have you tried laravel helper plugin or the free laravel ide helper? They add these annotations automatically.
Hmm. Have you tried laravel helper plugin or the free laravel ide helper? They add these annotations automatically.
Yes I have tried laravel-ide-helper, but needs to put Facade manually on config/app.php
...
I don't know why...
Description
I would like to add PHPDoc for Facade so that the ide helper works properly.
Screenshots
This is what I would like to do:![image](https://github.com/usernotnull/tall-toasts/assets/11542801/8f6ac651-5544-4eaa-9c2c-2de3ac86d950)
This is the ide helper without my code:![image](https://github.com/usernotnull/tall-toasts/assets/11542801/6aa1b154-04ba-4426-a8b5-05fc35213185)
And this is the ide helper with the phpdoc added:![image](https://github.com/usernotnull/tall-toasts/assets/11542801/f5cfee99-aa28-4720-9df7-90c893628769)
Additional context
In the end it doesn't change any logic, but it's improves the operation of the ide (at least phpstorm/idea) but I think also with vscode.