Install laravel and composerlaravel locally with composer in windows

Source: Internet
Author: User

Install laravel and composerlaravel locally with composer in windows

Local Installation

First, make sure that PHP has been correctly installed. Open the command line php-v to check whether the correct version number is output.

Run the following commands to install the latest version of Composer:
Note: The Administrator mode is required.

Php-r "copy ('https: //', 'composer-setup. php ');"

Php composer-setup.php

Php-r "unlink ('composer-setup. php ');"

Then, the latest version of composer. phar file is automatically downloaded to the current directory.

Then, you will find a file named composer. phar in your directory.

Copy the composer. phar file to any directory (such as the root directory of your php project), and then use the php composer. phar command to use Composer!
For example, php composer. phar-version


Modify the global configuration file of composer

Open the command line window again

Note: The Administrator mode is required.

Php composer. phar config-g repo. packagist composer


Use Composer to download the Laravel installation package:

Composer global require "laravel/installer"

Add the PATH environment variable (the Composer folder, the specific PATH is subject to the personal computer)

C: \ Users \ User \ AppData \ Roaming \ Composer \ vendor \ bin

After the installation is complete, you can use the laravel new command to create a newly installed Laravel application in your specified directory.

For example, the laravel new blog command will create a directory named blog under the current directory, which stores the newly installed Laravel and all the dependent packages have been installed. The installation speed of this method is much faster than that of Composer.

Laravel new blog


You can also run the Composer Create-Project command to install Laravel.
Composer create-project laravel/laravel -- prefer-dist


Initialize laravel dependency package
Php composer. phar update


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.