xu360


为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

 

分类:

技术点:

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-01-29
  • 2022-12-23
  • 2021-09-11
  • 2022-02-27
  • 2021-09-26
  • 2021-05-02
  • 2021-05-31
相关资源
相似解决方案