2

What we did
We have been assigned multiple projects in past few months. And we noticed that many function like Login, Registration, uploading picture, reset password, user profile and many more... were common for all these different websites. However, to complete the project in time, we simply copied the code from previous project to another while changing some field names in between.

My concern
Even though these websites are different and owned by different companies, it's us who manage/maintain the code for them. Is there any possible solution where our team can create a BASE CODE for these functions I mentioned earlier and use it for different websites when we need?

enter image description here


We have created project on Laravel 5.3
If you need any further elaboration/explanation, feel free to ask here.

LdiCO
  • 577
  • 12
  • 31
Digvijay
  • 7,836
  • 3
  • 32
  • 53

1 Answers1

0

Depending on what you exactly need, you could make an api for diffent things and/or you could make a script that copies the files automated frequently. If the Domains are on the same server, you could make one file-base for all Websites.

Bernhard
  • 1,852
  • 11
  • 19
  • Thanks, I appreciate for the feedback. I also came across few other ideas to do it -
    • put your code in Common_Code_Folder into a GIT repository.
    • use a script to deploy new versions pull new code (git pull)
    • this script can be executed manually on demand or by cron
    Since this common code is kind of a library to your custom PHP code, you also can update it via composer.

    What do you think about this?
    – Digvijay Nov 23 '16 at 16:42