-
Notifications
You must be signed in to change notification settings - Fork 93
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
Adding Facade For Calling The Functions #161
Conversation
This reverts commit dd55b71.
Genius! But wouldn't this PR be aimed at adding only the Facade? I mean, maybe you don't need things as examples, after all it's the same as the same. |
Hey @TarsisioXavier, If you want to reduce the number of imports, you could import the
Also, I'd avoid calling the class you've created a facade because it doesn't extend Laravel's |
Do you agree with the idea to have a Facade for this? |
I don't think I see a real need for the static class in this PR, especially with the namespace import already solving the multiple import issue mentioned in the PR description. Having it as a real facade is potentially interesting for mocking prompts, but it's not something I've personally felt the need for. Additionally, we're trying to avoid depending on any |
Thanks for the compliment @devajmeireles. Yeah those files wore only for me to verify if everything behave the same way, I only wanted to be sure, so they are completely disposable. |
Good morning @jessarcher, I did notice that you guys didn't make any facade and I was wondering why, so I tried my best to create one without the |
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions! |
The Feature 📦
In Laravel facades are a common thing to have, so I've made this small class which calls the functions of the helper file via static calls.
This PR adds a convenient way to call the functions without importing every function the dev uses in his script. I’ve also added a way to inject this facade class as an object - if the dev desires - and call the functions using “->”.
Possible Usages 📝