Home > Article > Backend Development > Initial installation of Laravel
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
composer Chinese image
laravel document
curl -sS https://getcomposer.org/installer | php # 修改 composer 的全局配置文件,修改为中国源 composer config -g repo.packagist composer https://packagist.phpcomposer.com
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
.
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.
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 blogCreate project through ComposerAlternatively, 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 Command
serve. This command will start the development server on
http://localhost:8000:
php artisan serveThe 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!