一 why Lavavel
1.1progressive
di,unit testing ,queues,real-time events.
1.2 scalable
1.3 Community Framework
二 first lavarel project
Installation Via Composer
If your computer already has PHP and Composer installed, you may create a new Laravel project by using Composer directly. After the application has been created, you may start Laravel's local development server using the Artisan CLI's serve command:
composer create-project laravel/laravel:^8.0 example-app
cd example-app
php artisan serve [改配置后要重启]
//或者nginx 配vhost
三 目录理解。
config 配置
database 数据库【迁移】
public 入口 index.php js,css
resoures lang views
routes 路由
storage 等同于其它框架的runtime
tests 测试
vendor 3 方类
.env 配置文件
其它 ,配nginx 路径美化。
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```
这样可以直接 /home