Lumen7.x 使用笔记(六) 参数验证异常处理 1. app\Exceptions目录下的Handler.php 修改代码如下 <?php namespace App\Exceptions; use App\Enums\WopCode; use App\Enums\WopMessage; use Exceptio...
Lumen7.x使用教程
Lumen7.x 使用笔记(五)Repository仓库
Lumen7.x 使用笔记(五)Repository仓库 使用 Repository 模式实现业务逻辑和数据访问的分离 按照最初提出者的介绍,Repository 是衔接数据映射层和领域层之间的一个纽带,作用相当于一个在内存中的域对象集合。...
Lumen7.x 使用笔记(四)JWT-AUTH认证
安装包 composer require tymon/jwt-auth Bootstrap file changes. Add the following snippet to the bootstrap/app.php file under the providers section as follows: // Uncomment this line $app->regist...
Lumen7.x使用笔记(三) command命令
Lumen是Laravel的精华版,用过Laravel的童鞋们都知道Laravel的Command的命令很强大。但是lumen没有完成继承,要想使用这些 命令需要自己安装 小编使用的是James.xue包 安装 composer require james.xue/lumen-gen...
Lumen 7.x使用笔记(二)配置篇
Call to a member function connection() on null 解决办法: 修改bootstrap/app.php文件 将// $app->withEloquent(); 注释去掉即可 A facade root has not been set. 解决办法: 修改bootstrap/app.php文件 ...
Lumen7.x使用笔记(一)安装篇
安装lumen7.x composer create-project --prefer-dist laravel/lumen wop 7.x 报错: Failed to decode response: zlib_decode(): data error Retrying with degraded mode, check https://getcomposer.org/doc/ar...