为composer设置代理
在cmd中 SET HTTP_PROXY=https://127.0.0.1:57364
安装Laravel
composer create-project laravel/laravel --prefer-dist my_laravel
启动服务
php -S localhost:80 -t my_laravel/public
添加路由
routes/web.php
查看路由
php artisan route:list
创建控制器
php artisan make:controller MyController
创建Model
php artisan make:model User 示例: protected $table = 'users'; protected $primaryKey = 'user_id'; protected $guarded = ['user_id']; protected $hidden = ['userpass']; $user = new App\User(); return $user->all();
服务异常,访问显示503显示
php artisan down
php artisan up
视图
@include('compoments.head')
配置文件(调试、数据库...)
.env