Метод |
Описание |
|
__call ( $method, $args ) |
|
|
__construct ( Model $model ) |
架构函数 |
|
attach ( mixed $data, array $pivot = [] ) : integer |
附加关联的一个中间表数据 |
|
belongsTo ( string $model, string $foreignKey, string $otherKey, array $alias = [], string $joinType = 'INNER' ) |
BELONGS TO 关联定义 |
|
belongsToMany ( string $model, string $table, string $foreignKey, string $localKey, array $alias ) |
BELONGS TO MANY 关联定义 |
|
detach ( integer | array $data, boolean $relationDel = false ) : integer |
解除关联的一个中间表数据 |
|
eagerlyResult ( Model $result, string $relation, string $class = '' ) : Model |
预载入关联查询 返回模型对象 |
|
eagerlyResultSet ( array $resultSet, string $relation, string $class = '' ) : array |
预载入关联查询 返回数据集 |
|
getRelation ( $name ) |
获取关联数据 |
|
getRelationInfo ( string $name = '' ) : array | string | integer |
获取当前关联信息 |
|
hasMany ( string $model, string $foreignKey, string $localKey, array $alias ) |
HAS MANY 关联定义 |
|
hasManyThrough ( string $model, string $through, $foreignKey, $throughKey, string $localKey, array $alias ) |
HAS MANY 远程关联定义 |
|
hasOne ( string $model, string $foreignKey, string $localKey, array $alias = [], string $joinType = 'INNER' ) |
HAS ONE 关联定义 |
|
save ( mixed $data, array $pivot = [] ) : integer |
保存(新增)当前关联数据对象 |
|
saveAll ( array $dataSet, array $pivot = [] ) : integer |
批量保存当前关联数据对象 |
|
setAlias ( array $alias ) |
设置当前关联定义的数据表别名 |
|