Свойство | Тип | Описание | |
---|---|---|---|
$versioningEnabled | boolean | Flag that determines if the model allows versioning at all |
Метод | Описание | |
---|---|---|
bootVersionableTrait ( ) | Initialize model events | |
currentVersion ( ) : |
Returns the latest version available | |
disableVersioning ( ) | ||
enableVersioning ( ) | ||
getVersionModel ( $version_id ) | Get a model based on the version id | |
previousVersion ( ) : |
Returns the previous version | |
setReasonAttribute ( string $value ) | Attribute mutator for "reason" Prevent "reason" to become a database attribute of model | |
versions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany | Return all versions of the model |
Метод | Описание | |
---|---|---|
getAuthUserId ( ) : integer | null | ||
versionablePostSave ( ) : void | Save a new version. | |
versionablePreSave ( ) : void | Pre save hook to determine if versioning is enabled and if we're updating the model |
Метод | Описание | |
---|---|---|
isValidForVersioning ( ) : boolean | Determine if a new version should be created for this model. |
public static bootVersionableTrait ( ) |
public currentVersion ( ) : |
||
Результат |
protected getAuthUserId ( ) : integer | null | ||
Результат | integer | null |
public getVersionModel ( $version_id ) | ||
$version_id |
public previousVersion ( ) : |
||
Результат |
public setReasonAttribute ( string $value ) | ||
$value | string |
protected versionablePostSave ( ) : void | ||
Результат | void |
protected versionablePreSave ( ) : void | ||
Результат | void |
public versions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany | ||
Результат | Illuminate\Database\Eloquent\Relations\MorphMany |
protected bool $versioningEnabled | ||
Результат | boolean |