Home  >  Article  >  Backend Development  >  Laravel installation tips

Laravel installation tips

一个新手
一个新手Original
2017-09-12 10:47:361156browse

Officially recommended laravel development environment homestead (an official pre-packaged Linux virtual machine based on virtualbox,
A series of software Nginx, PHP5.6, MySQL, Postgres, Redis, etc. are installed in this virtual machine. Memcached, etc.);

Install Composer (you need to use the composer command in any cmd global file location)

php.ini => php_openssl.dll extension library must be enabled

Method 1. Windows can directly download Composer-Setup.exe (some domestic networks cannot access the US Composer official website, and the speed is slow, and FQ is required, and the installation may fail)

Method 2. Configure the php.exe directory Environment variables, download composer.phar and php.exe level directories,
Create a new composer.bat file and edit the following content @php "%~dp0composer.phar" %*
Run composer.bat, if the version number appears, it means success
Execute composer self-update to keep Composer up to date

Also accessing foreign countries is slow, configure it to access China's full mirror (recommended method) composer config -g repo.packagist composer https://packagist.phpcomposer .com

Use this command to install laravel: composer create-project laravel/laravel folder name parameter version number parameter (without this parameter, the latest version will be installed by default)
Use the command php artisan serve in the project directory to view access The project URL defaults to localhost:8000
Use the command in the project directory to set the port number to access this project php -S localhost:custom port number -t public

The above is the detailed content of Laravel installation tips. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn