Hi, I'm building an app which consistently uses the curl function but with some slight tweaks to variables in the curl function. I don't want to have to create a curl call in every controller I build.
I've poked around and found a few bits about using a custom helper class which seems like it would work. Or I could create my own package which also seems like it could work but potentially overkill in my case.
I just want to check what is best practice for creating a class/function that I'll call from many controllers?
You can create a static class in a folder like libraries in your app folder and add it to autoload, then you should be able to call it
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community