Detailed steps for installing the laravel development framework in China

Source: Internet
Author: User

Detailed steps for installing the laravel development framework in China

Server Requirements #

The Laravel framework has some system requirements. Make sure that the following extensions are installed on your server:

    PHP >= 5.6.4    OpenSSL PHP Extension    PDO PHP Extension    Mbstring PHP Extension    Tokenizer PHP Extension    XML PHP Extension
Note: It is strongly recommended that Homestead be used as a development environment, especially for beginners, to avoid unnecessary troubles. For the online environment, see the Homestead environment deployment script.

Install Laravel #

Laravel uses Composer to manage code dependencies. Therefore, before using Laravel, make sure that Composer is installed on your computer.

Install the tool through Laravel #

First, use Composer to download the Laravel installation package:

composer global require "laravel/installer"

Make sure you have~ /. Add the composer/vendor/bin PATH to the PATH. Only in this way can the system find the laravel execution file.

There is a wall in China, so we need to use the domestic source:
Modify the global configuration file of composer (Recommended Methods)

Open the command line window (windows User) or Console (Linux, Mac user) and execute the following command: composer config-g repo. packagist composer https://packagist.phpcomposer.com

Once the installation is complete, you can use the laravel new command to create a new Laravel project in the specified directory. For example, laravel new blog will create a directory named blog in the current directory, this directory contains the newly installed Laravel and code dependencies. The installation speed of this method is much faster than that of using Composer:

laravel new blog

Because code dependencies are directly packaged and installed together.

You can also use Composer to run the create-project command on the command line to install Laravel:

composer create-project --prefer-dist laravel/laravel blog

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: info-contact@alibabacloud.com 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.