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
UseComposer
to manage dependencies. So, before usingLaravel
, please make sureComposer
is installed on your machine.
There are two ways to followlaravel
.
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 newcommand will create a new Laravel project in the directory you specify. For example, the
laravel new blogcommand will create a directory named
blogthat contains all installed
Laraveldependencies:
laravel new blog
Laravelby running the
create-projectcommand in the terminal:
composer create-project --prefer-dist laravel/laravel blog "5.5.*"
PHPand want to use the
PHPbuilt-in development server to serve your application, then use
ArtisanCommand
serve. This command will start the development server on
http://localhost:8000:
php artisan serve
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!