Question

I wonder if is possibile to "move" the vendor folder to another location. I mean, I've a structure like this

  • /
  • Laravel Project 1
  • Laravel Project 2
  • Laravel Project 3
  • [... others ...]
  • CDN (For vendor if I can)

Well as you know every project comes with the vendor/ folder. I want to move that folder inside the CDN and "merge" all the requirements for every project in another composer outside the projects folder (inside CDN i guess).

Why this?

Simply because I've notice that vendors folder are nearly the same for every project so if I can combine all the "differences" in one single big vendor folder I can manage all the dependencies in one single location, pretty cool

Is that possible?

TY for any help :) Have a nice day.

Was it helpful?

Solution

In Laravel you can change the folder your applications load the framework and dependencies from bootstrap/autoload.php.

There's a require __DIR__.'/../vendor/autoload.php'; line in it and you can change it to whatever you need. Thus you can change it to some outside folder, common to all projects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top