Laravel: deployment and provider folder

I just finished a simple job done in Laravel 4, and I'm ready to deploy to my server.

I found that the provider folder is 100 MB in size, and I am wondering if all its subfolders need to be downloaded. I suggest that I do not use most of these libraries, is there any good practice for deploying a Laravel project?

+6
source share
3 answers

Better to use

composer create-project laravel/laravel --prefer-dist <project directory> 

To create a project. Using your supplier’s dir server will start with only 10 MB. (I just did it here and downloaded it for me).

And it looks like you can also:

 composer update --no-dev --prefer-dist 

To reduce the current use of project space.

But ... the supplier’s directory and all its first-level subdirectories are required (if you use all the packages you have installed), but there are some subdirectories inside them that you can easily ignore during deployment, for example:

 */examples/* */docs/* */docs2/* (Doctrine) */tests/* */test/* */Tests/* (Carbon) */swiftmailer/swiftmailer/notes/* 
+9
source

I did not apply the L4 application at this point, but ran into problems since I do not have git / composer access on my host server. Unless something smart happens, FTP / SSH is my only way to get my files on the server.

In the /vendors folder is required for your application to function. Think of sellers as a /core folder in other frameworks. All of the heavy lifting in Laravel is controlled through packages contained within /vendors , and therefore without this folder your application will simply crash.

+4
source

You should not download the provider folder, you should run the composer installation / update on your server where you are deploying. You must deploy your application files.

+3
source

Source: https://habr.com/ru/post/948620/


All Articles