Tailor\Traits\VersionableModel

Overview

VersionableModel trait allows version versions of models


Public Methods

public static bootVersionableModel()

public static bootVersionableModel(): void

bootVersionableModel trait for a model.

public countVersions()

public countVersions(): int 

countVersions will return the number of available versions.

public getIsVersionColumn()

public getIsVersionColumn(): string 

getIsVersionColumn gets the name of the "is_version" column.

public getQualifiedIsVersionColumn()

public getQualifiedIsVersionColumn(): string 

getQualifiedIsVersionColumn gets the fully qualified "is_version" column.

public getVersionRecords()

public getVersionRecords(): void

public initializeVersionableModel()

public initializeVersionableModel(): void

public isVersionStatus()

public isVersionStatus(): bool 

public restoreVersionSnapshot()

public restoreVersionSnapshot($toModel): void

public saveVersionSnapshot()

public saveVersionSnapshot($attrs = []): void

Protected Methods

protected getVersionableTransferAttributes()

protected getVersionableTransferAttributes(): void

getVersionableTransferAttributes override method