Model Configuration
accessibleProperties()
Signature
Section titled “Signature”accessibleProperties() — returns void
Available in: model
Category: Miscellaneous Functions
Description
Section titled “Description”Use this method to specify which properties can be set through mass assignment.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
properties | string | no | — | Property name (or list of property names) that are allowed to be altered through mass assignment. |
Examples
Section titled “Examples”// Make `isActive` the only property that can be set through mass assignment operations like `updateAll()`.
config() {
accessibleProperties("isActive");
}