PHP Класс Corcel\Model

Наследование: extends Illuminate\Database\Eloquent\Model
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
belongsTo ( string $related, null $foreignKey = null, null $otherKey = null, null $relation = null ) : BelongsTo Replace the original belongsTo function to forward the connection name
belongsToMany ( string $related, null $table = null, null $foreignKey = null, null $otherKey = null, null $relation = null ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Replace the original belongsToMany function to forward the connection name
getRelationValue ( string $key ) : mixed Get the relation value setting the connection name
hasMany ( string $related, null $foreignKey = null, null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany Replace the original hasMany function to forward the connection name
hasOne ( string $related, null $foreignKey = null, null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne Replace the original hasOne function to forward the connection name

Защищенные методы

Метод Описание
setRelationConnection ( $model ) Set the connection name to model

Описание методов

belongsTo() публичный Метод

Replace the original belongsTo function to forward the connection name
public belongsTo ( string $related, null $foreignKey = null, null $otherKey = null, null $relation = null ) : BelongsTo
$related string
$foreignKey null
$otherKey null
$relation null
Результат Illuminate\Database\Eloquent\Relations\BelongsTo

belongsToMany() публичный Метод

Replace the original belongsToMany function to forward the connection name
public belongsToMany ( string $related, null $table = null, null $foreignKey = null, null $otherKey = null, null $relation = null ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
$related string
$table null
$foreignKey null
$otherKey null
$relation null
Результат Illuminate\Database\Eloquent\Relations\BelongsToMany

getRelationValue() публичный Метод

Get the relation value setting the connection name
public getRelationValue ( string $key ) : mixed
$key string
Результат mixed

hasMany() публичный Метод

Replace the original hasMany function to forward the connection name
public hasMany ( string $related, null $foreignKey = null, null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany
$related string
$foreignKey null
$localKey null
Результат Illuminate\Database\Eloquent\Relations\HasMany

hasOne() публичный Метод

Replace the original hasOne function to forward the connection name
public hasOne ( string $related, null $foreignKey = null, null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne
$related string
$foreignKey null
$localKey null
Результат Illuminate\Database\Eloquent\Relations\HasOne

setRelationConnection() защищенный Метод

Set the connection name to model
protected setRelationConnection ( $model )
$model