## **安装**
### **服务器要求**
>PHP >= 7.3
>BCMath PHP 拓展
>Ctype PHP 拓展
>Fileinfo PHP 拓展
>JSON PHP 拓展
>Mbstring PHP 拓展
>OpenSSL PHP 拓展
>PDO PHP 拓展
>Tokenizer PHP 拓展
>XML PHP 拓展
### **安装 Laravel**
>Laravel 使用[Composer](https://getcomposer.org/)来管理项目依赖。因此,在使用 Laravel 之前,请确保您的机器上已经安装了 Composer。
```
composer create-project --prefer-dist laravel/laravel blog
```
### **Web 服务器配置**
#### **Apache**
>Laravel 中包含了一个 `public/.htaccess` 文件,通常用于在资源路径中隐藏 index.php 的前端控制器。在用 `Apache` 为 `Laravel` 提供服务之前,确保启用了项目服务模块,这样 `.htaccess` 文件才能被服务器解析。
>如果 `Laravel` 附带的 `.htaccess` 文件不起作用,尝试下面的方法替代:
```
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
```
#### **Nginx**
如果你使用 `Nginx` ,在你的站点配置中加入以下配置,所有的请求将会引导至`index.php`前端控制器:
```
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```