Свойство | Тип | Описание | |
---|---|---|---|
$timestamps | boolean | Indicates if the model should be timestamped. Turn off by default. |
Свойство | Тип | Описание | |
---|---|---|---|
$afterDeleteCallbacks | callable[] | An array of callbacks to be run once after the model is deleted. | |
$afterSaveCallbacks | callable[] | An array of callbacks to be run once after the model is saved. |
Метод | Описание | |
---|---|---|
__call ( $method, $arguments ) | ||
__construct ( array $attributes = [] ) | ||
afterDelete ( callable $callback ) : void | Register a callback to be run once after the model is deleted. | |
afterSave ( callable $callback ) : void | Register a callback to be run once after the model is saved. | |
boot ( ) | ||
getAttribute ( string $key ) : mixed | Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key. | |
getDates ( ) : array | Get the attributes that should be converted to dates. | |
releaseAfterDeleteCallbacks ( ) : callable[] | ||
releaseAfterSaveCallbacks ( ) : callable[] |
Метод | Описание | |
---|---|---|
getCustomRelation ( string $name ) : mixed | Get a custom relation object. |
public afterDelete ( callable $callback ) : void | ||
$callback | callable | |
Результат | void |
public getAttribute ( string $key ) : mixed | ||
$key | string | |
Результат | mixed |
protected getCustomRelation ( string $name ) : mixed | ||
$name | string | |
Результат | mixed |
public releaseAfterDeleteCallbacks ( ) : callable[] | ||
Результат | callable[] |
public releaseAfterSaveCallbacks ( ) : callable[] | ||
Результат | callable[] |
protected callable[] $afterDeleteCallbacks | ||
Результат | callable[] |
protected callable[] $afterSaveCallbacks | ||
Результат | callable[] |
public bool $timestamps | ||
Результат | boolean |