Download the PHP package lany/mingdaoyun without Composer
On this page you can find all versions of the php package lany/mingdaoyun. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mingdaoyun
mingdaoyun-PHP-SDK
针对mingdaoyun的API封装的PHP-SDK包
Python 版本:https://github.com/ghostlitao/mingdaoyun-python-sdk
Features
- [x] 封装基础API
- [x] 固定数据的CRUD
- [x] syncToDB 功能
- [ ] 明道云组织架构接口
Installing
Usage
-
Laravel (>=5.5)
1.2.0开始支持发布配置文件
修改
.env,添加配置示例代码
-
ThinkPHP (>=5.1)
1.2.0开始支持5.1请手动use Lany\MingDaoYun\Facade\MingDaoYun;使用,6.0以上可以使用下面的方式修改
.env,添加配置示例代码
- Other `
Function
- init
- table
- limit
- page
- fieldMap
- with
- sort
- whereOr
- where
- whereIn
- whereNull
- whereNotNull
- whereDate
- whereNotDate
- get
- find
- relations
- view
- insert
- create
- delete
- update
- updateRows
- all
- count
- dateRange
- notDateRange
- customize
- 同步数据到本地数据库
- workflow
- notGetTotal
- whereBetween
- whereNotBetween
- whereGroup
init
设置初始化参数
table
设置工作表
limit
要获取的数据行数
page
设置页码
fieldMap
获取字段对照关系(明道云工作表结构)
with
要获取关联记录时,设置rowId,controlId
relations
获取关联记录
1.1.1修改为默认获取100条关联记录,relations(true)获取所有关联记录
sort
设置排序字段,默认为升序
whereOr
设置筛选条件,以or的方式拼接下一个条件,使用whereOr时必须写在where()之前
where
设置筛选条件,以and的方式拼接下一个条件,目前支持的运算符有
contains,notContain,startWith,endWith,=,!=,>,>=,<,<=,RCEq,RCNe
whereIn
wehreIn
whereNull
字段为空
whereNotNull
字段为不为空
whereDate
日期是
whereNotDate
日期不是
get
获取工作表内容
1.1.0修改为默认最多获取1000条数据,如需获取更多数据请使用limit设置,获取所有数据请使用all
find
获取单条记录(行记录详情)
view
设置视图ID
insert
新增单条记录,按明道云新增controls参数格式传入data即可
create
批量新增记录,按明道云批量新增rows参数格式传入data即可
delete
删除行记录,多条记录以
,分隔rowId
update
更新单行记录
updateRows
批量更新行记录,(目前明道只支持每次更新一个字段)
all
获取所有数据
此方法为1.1.0新增
count
统计数据行数
此方法为1.1.0新增
keyword默认为空
dateRange
此方法为1.4.0新增
日期区间
支持Today,Tomorrow,Yesterday,ThisWeek,Next7Day,Last14Day等,具体可查看明道云文档 DateRange
notDateRange
此方法为1.4.0新增
不在日期区间 支持
Today,Tomorrow,Yesterday,ThisWeek,Next7Day,Last14Day等,具体可查看明道云文档 DateRange
customize
此方法为1.4.0新增
自定义查询条件,按官方文档的格式传入数组参数
workflow
1.4.2是否触发工作流 默认为true
notGetTotal
1.4.2是否不统计总行数以提高性能 默认为false
whereBetween
whereNotBetween
同步数据到本地数据库
1.2.0新增Laravel和ThinkPHP5.1如果不存在数据表会自动创建(ThinkPHP6需先手动创建数据表),以明道云字段别名创建数据字段,如不存在别名则使用明道控件ID创建
-
修改对应的
Model文件 - 调用
syncToDB
whereGroup
1.5.0新增
whereGroup($callable, $spliceType), spliceType为and/or,默认为and
License
MIT
All versions of mingdaoyun with dependencies
ext-json Version *
php Version >=7.4
doctrine/inflector Version ^2.0