Laravel install the specified version

1. Enter the root directory (local www directory) to install the specified version, demo is the folder name of the project, and version 5.8 is installed here;

composer create-project laravel/laravel=5.8.* demo --prefer-dist

2. If an error is reported that the cache byte size limit is exceeded or timed out, you may wish to replace the composer source of Alibaba Cloud (available for pro-test)

composer config repo.packagist composer https://mirrors.aliyun.com/composer/

Repo is shorthand for repositories

The above command value is valid for the current project, if you need to set the global one, add -g or --global after config

Note:
   If it is just because the size of the cache is exceeded, you only need to modify the cache size.
   Modify the command:composer config cache-files-maxsize 800MiB

3. Check the current version number of Laravel;

php artisan --version

Guess you like

Origin blog.51cto.com/13640989/2544355