Property | Type | Description | |
---|---|---|---|
$timestamps | boolean | Indicates if the model should be timestamped. Turn off by default. |
Property | Type | Description | |
---|---|---|---|
$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. |
Method | Description | |
---|---|---|
__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[] |
Method | Description | |
---|---|---|
getCustomRelation ( string $name ) : mixed | Get a custom relation object. |
public afterDelete ( callable $callback ) : void | ||
$callback | callable | |
return | void |
public getAttribute ( string $key ) : mixed | ||
$key | string | |
return | mixed |
protected getCustomRelation ( string $name ) : mixed | ||
$name | string | |
return | mixed |
public releaseAfterDeleteCallbacks ( ) : callable[] | ||
return | callable[] |
public releaseAfterSaveCallbacks ( ) : callable[] | ||
return | callable[] |
protected callable[] $afterDeleteCallbacks | ||
return | callable[] |
protected callable[] $afterSaveCallbacks | ||
return | callable[] |
public bool $timestamps | ||
return | boolean |