Home  >  Article  >  PHP Framework  >  Install the Laravel installer using Composer

Install the Laravel installer using Composer

藏色散人
藏色散人forward
2020-09-15 09:36:312861browse

The following tutorial column will introduce to you how to use Composer to install the Laravel installer. I hope it will be helpful to friends in need!

Install Laravel installer using Composer:

composer global require laravel/installer
Install the Laravel installer using ComposerMake sure to place Composer's global vendor bin directory in your system environment variable$PATH

so that the system can find the Laravel executable file. The path to this directory varies between operating systems; some common locations are listed below:

macOS: $HOME/.composer/vendor/bin

  • Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin
  • GNU / Linux distribution: $HOME/.config/composer/vendor /bin or
  • $HOME/.composer/vendor/bin
  • You can also find and view Composer by running the composer global about
  • command Global installation path.

After the installation is complete, the laravel new command will create a new Laravel project in the directory you specify.

For example, laravel new blog will create a directory named

blog

and have all Laravel dependencies installed:<pre class="brush:php;toolbar:false">laravel new blog</pre>

The above is the detailed content of Install the Laravel installer using Composer. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete