I. Install the composer package management tool, which is not described in detail:
Download using the curl Command:
Curl-sS https://getcomposer.org/installer | php
Or?] Have security? Curl can also be downloaded using the php command:
Php-r "readfile ('https: // getcomposer.org/installer');" | php
Or manually download composer. phar
2. Install composer and run the following command:
Composer create-project laravel/laravel learnlaravel5 5.0.22laravel5-install
3. If the following error occurs during installation:
Your requirements cocould not be resolved to an installable set of packages. problem 1-Installation request for laravel/framework v5.0.16-> satisfiable by laravel/framework [v5.0.16]. -laravel/framework v5.0.16 requires ext-mcrypt *-> the requested PHP extension mcrypt is missing from your system.
Solution: install the MAMP integrated development environment locally:
Which php: check the php execution path. usr/bin/php indicates the php version that comes with the system.
Cd ~ Vim/. bash_profile
Add a row:
Export PATH =/Applications/MAMP/bin/php/php5.6.7/bin: $ PATHsource. bash_profile
Which php: In this case, php is executing mamp php.