PHP Трейт Eloquence\Behaviours\Cacheable

Показать файл Открыть проект

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

Метод Описание
rebuildCacheRecord ( array $config, Model $model, $command, null $aggregateField = null ) : mixed Rebuilds the cache for the records in question.
updateCacheRecord ( array $config, string $operation, integer | float | double $amount, string $foreignKey ) Updates a table's record based on the query information provided in the $config variable.

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

Метод Описание
field ( string $model, string $field ) : string Creates the key based on model properties and rules.
getModelTable ( string | Model $model ) : mixed Returns the table for a given model. Model can be an Eloquent model object, or a full namespaced class string.
key ( string $field ) : mixed Returns the true key for a given field.
processConfig ( array $config ) : array Process configuration parameters to check key names, fix snake casing, etc.

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

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

Creates the key based on model properties and rules.
protected field ( string $model, string $field ) : string
$model string
$field string
Результат string

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

Returns the table for a given model. Model can be an Eloquent model object, or a full namespaced class string.
protected getModelTable ( string | Model $model ) : mixed
$model string | Illuminate\Database\Eloquent\Model
Результат mixed

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

Returns the true key for a given field.
protected key ( string $field ) : mixed
$field string
Результат mixed

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

.
protected processConfig ( array $config ) : array
$config array
Результат array

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

Rebuilds the cache for the records in question.
public rebuildCacheRecord ( array $config, Model $model, $command, null $aggregateField = null ) : mixed
$config array
$model Illuminate\Database\Eloquent\Model
$command
$aggregateField null
Результат mixed

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

Updates a table's record based on the query information provided in the $config variable.
public updateCacheRecord ( array $config, string $operation, integer | float | double $amount, string $foreignKey )
$config array
$operation string Whether to increase or decrease a value. Valid values: +/-
$amount integer | float | double
$foreignKey string