final |
|---|
readonly |
Opts a model into the change log: every change of a listed attribute becomes a position under the head of the run that made it.
fields names the audited attributes — and only those: an attribute that is not listed never enters the log,
so the list is the redaction too. Never list a password, a token or anything the model hides, hashes or
encrypts. created_at and updated_at never enter.
key names the column or columns of the subject's stable key; several columns are joined by : (AT:U20).
Without it the primary key is used.
#[Audited(fields: ['partner_id', 'role_id', 'valid_from', 'valid_until'])]
class RoleAssignment extends Model {}
A model without the attribute writes no positions; whoever writes it still writes it through the model.
| Methods | ||
|---|---|---|
public
|
__construct(list<string> $fields, string|list<string>|null $key = null)
|
# |
| Properties | |||
|---|---|---|---|
public
|
list<string>
|
$fields
|
# |
public
|
string|list<string>|null
|
$key
|
# |