Home  >  Article  >  Backend Development  >  Initial installation of Laravel

Initial installation of Laravel

不言
不言Original
2018-07-06 10:53:091474browse

This article mainly introduces the initial installation of Laravel, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

Laravel's initial installation

composer Install

composer Chinese image
laravel document

curl -sS https://getcomposer.org/installer | php
# 修改 composer 的全局配置文件,修改为中国源
composer config -g repo.packagist composer https://packagist.phpcomposer.com

Install Laravel

Laravel Use Composer to manage dependencies. So, before using Laravel, please make sure Composer is installed on your machine.
There are two ways to follow laravel.

Through the Laravel installer

First, download the Laravel installer using Composer:

composer global require "laravel/installer"

Make sure The $HOME/.composer/vendor/bin directory (or the equivalent for your operating system) has been placed in your environment variable $PATH so that the system can find it ## Executable file for #laravel.

After installation, the

laravel new command will create a new Laravel project in the directory you specify. For example, the laravel new blog command will create a directory named blog that contains all installed Laravel dependencies:

laravel new blog
Create project through Composer

Alternatively, you can also install

Laravel by running the create-project command in the terminal:

composer create-project --prefer-dist laravel/laravel blog "5.5.*"
locally Development Server

If you have a local installation of

PHP and want to use the PHP built-in development server to serve your application, then use Artisan Commandserve. This command will start the development server on http://localhost:8000:

php artisan serve
The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please Follow PHP Chinese website!

Related recommendations:

Laravel5.5 solution to the problem that the table is empty when executing the table migration command

laravel Redis simply implements queue passing High concurrency processing of stress testing

The above is the detailed content of Initial installation of Laravel. 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