File common functions between various projects in Laravel

Asked

Viewed 89 times

0

I’m developing a large web project, a project that is a cluster of sub-projects programmed in Laravel. Naturally, this project has many common functions to be used among several files and classes of each of these sub-projects. What I’d like to know is how to create a file of common functions to be used among all these sub-projects and how best to do this for a project with a large scalability curve.

  • look just how is being elaborated this project? could you explain two sub-systems? because depending everything is shared in all projects!

  • @Virgilionovic will basically have an intermediate project, which will receive the requests directly from the user. Once received, it will process these requests and make a new request to one of the sub-projects, depending on what the user requested for this intermediate project. Finally it will receive the response of one of these sub-projects and will process this response to the user.

  • But where will all this be! is a project and within this project other projects?

  • @Virgilionovic These are separate projects that will talk to each other through Curl requests, for example, I want a common function to receive and handle these requests.

  • As it is Laravel you can create packages, just like we installed via https://packagist.org/ and make it available for all your other projects, at least when you have upgrades all projects have changed ...! this is the tip I give!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.