* @date 2020/3/18 10:41 * * @return \think\response\Json * @throws \think\exception\DbException */ public function index() { return IResponse::paginate(model('OperationLog')->with(['user']) ->paginate(input('limit'),false)); } /** * 清空日志 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/3/20 15:50 * * @return \think\response\Json * @throws \think\db\exception\BindParamException * @throws \think\exception\PDOException */ public function clear() { model('OperationLog')->execute("truncate TABLE " . config('database.prefix') . "system_operate_log"); return IResponse::success('清空成功'); } }