3
I would like to create functions that are globally available to reuse the code.
What would be the best way to do this, in the Standard...
The flow I need would be like this.:
I’ll get a requisition " Route "
then I will process > "Controler " in this case I will have to do several processing so I thought to do various functions that can be used, in which case I will use third party API for processing as well. then I will display using > "View Blade".
Any idea would be welcome...
I don’t know if Laravel has something for that already, but I suggest putting these functions separately in a file and using a namespace in that file, then you can use something like
MyUtils\myFunction()
– Costamilam