PHP Class Mpociot\Versionable\Version

Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: mpociot/versionable Class Usage Examples

Méthodes publiques

Свойство Type Description
$table string

Protected Properties

Свойство Type Description
$primaryKey string

Méthodes publiques

Méthode Description
diff ( Version $againstVersion = null ) : array Diff the attributes of this version model against another version.
getModel ( ) : Model Return the versioned model
getResponsibleUserAttribute ( ) : mixed Return the user responsible for this version
revert ( ) : Model Revert to the stored model version make it the current version
versionable ( ) : Illuminate\Database\Eloquent\Relations\MorphTo Sets up the relation

Method Details

diff() public méthode

If no version is provided, it will be diffed against the current version.
public diff ( Version $againstVersion = null ) : array
$againstVersion Version
Résultat array

getModel() public méthode

Return the versioned model
public getModel ( ) : Model
Résultat Illuminate\Database\Eloquent\Model

getResponsibleUserAttribute() public méthode

Return the user responsible for this version
public getResponsibleUserAttribute ( ) : mixed
Résultat mixed

revert() public méthode

Revert to the stored model version make it the current version
public revert ( ) : Model
Résultat Illuminate\Database\Eloquent\Model

versionable() public méthode

Sets up the relation
public versionable ( ) : Illuminate\Database\Eloquent\Relations\MorphTo
Résultat Illuminate\Database\Eloquent\Relations\MorphTo

Property Details

$primaryKey protected_oe property

protected string $primaryKey
Résultat string

$table public_oe property

public string $table
Résultat string