P
P
Pantene7422017-02-15 19:09:58
Laravel
Pantene742, 2017-02-15 19:09:58

How to transfer a Laravel project to a virtual server, why use composer on a server?

In the video course that I watched the instructions for transferring to hosting. and the author of the course touched on very few nuances.
I open English-language tutorials and I can't understand. why install composer on the server?
I assume that the contents of the Vendor folder and others are not transferred.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WebDev, 2017-02-15
@Pantene742

That's right, the contents of the vendor folder are not transferred. They transfer only the project itself, the business logic itself. All dependencies, as well as all dynamic media files, logs, etc., are not migrated.
For convenient transfer of the project to the server, version control systems are used, which themselves monitor, among other things, "extra" files / directories, and do not transfer them.
In principle, no one forbids you to transfer the entire project and update it the old fashioned way, overwriting old files.

S
Stanislav Pochepko, 2017-02-15
@DJZT

Composer does not have to be installed on the server. You can bring the composer.phar file with you in the root of the project (If you download it there) and then run the php composer.phar install command and the entire vendor folder will download itself. She doesn't need to be dragged along. There may be a huge number of files that you will upload via FTP for an hour, two, or even more.
php composer.phar install
Only if you also have a composer.json file that describes your dependencies. The same laravel frameworks and other dependencies (packages, libraries, ....)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question