### 服務器要求
請確保你的服務器滿足以下要求:
* PHP >= 7.1.3
* OpenSSL PHP 拓展
* PDO PHP 拓展
* Mbstring PHP 拓展
* Tokenizer PHP 拓展
* XML PHP 拓展
* Ctype PHP 拓展
* JSON PHP 拓展
* BCMath PHP 拓展
#### 通過 Laravel 安裝器
```
composer global require laravel/installer
```
安裝完成后,新建一個laravel項目
```
laravel new blog
```
#### 通過 Composer 創建項目
```
composer create-project --prefer\-dist laravel/laravel blog 5.8.*
```
### 優雅鏈接(去除index.php)
Laravel 中包含了一個`public/.htaccess`文件通常用于在資源路徑中隱藏`index.php`的前端控制器。在用 Apache 為 Laravel 提供服務之前,確保啟用了`mod_rewrite`模塊,這樣`.htaccess`文件才能被服務器解析。
如果 Laravel 附帶的`.htaccess`文件不起作用,嘗試下面的方法替代:
#### Apache
```
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
```
location / { try\_files $uri $uri/ /index.php?$query\_string; }
```