프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 currentVersion ( ) : |
||
리턴 |
public getVersionModel ( $version_id ) | ||
$version_id |
public previousVersion ( ) : |
||
리턴 |
public setReasonAttribute ( string $value ) | ||
$value | string |
protected versionablePreSave ( ) : void | ||
리턴 | void |
public versions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany | ||
리턴 | Illuminate\Database\Eloquent\Relations\MorphMany |
protected bool $versioningEnabled | ||
리턴 | boolean |