R
R
Roman2019-02-24 15:13:28
Composer
Roman, 2019-02-24 15:13:28

Does it matter in the context of which directory the composer command is executed?

Hello.
I'm not familiar with composer (and to be honest, I don't really understand what it is, I just realized that it's about installing scripts and some dependencies), but I constantly stumble. I am learning Laravel and here is the main question:
- In the descriptions for installing packages for Laravel, I have not seen anywhere instructions from which directory to run the composer command - does this mean that it can be run from any directory?
This seems a little strange to me, because if I have several Laravel installed on the host - it turns out that the packages will be installed in each Laravel application - right?
Please help me figure it out.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-02-24
@procode

Answer from Maxim Fedorov Maxim Fedorov

each project has its own composer.json, the command is entered from this directory and in the same directory the libraries fall into the vendor folder
, not counting the composer global

I don’t know what composer global is)) but in general it’s clear - by default it means that you are in the root of the project to which you are installing the package.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question