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
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
%USERPROFILE%\AppData\Roaming\Composer\vendor\bin
$HOME/.config/composer/vendor /bin
or
You can also find and view Composer by running the
composer global aboutAfter 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
and have all Laravel dependencies installed:<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">laravel new blog</pre><div class="contentsignin">Copy after login</div></div>
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!