Skip to content

Model Configuration

accessibleProperties()

accessibleProperties() — returns void

Available in: model Category: Miscellaneous Functions

Use this method to specify which properties can be set through mass assignment.

NameTypeRequiredDefaultDescription
propertiesstringnoProperty name (or list of property names) that are allowed to be altered through mass assignment.
// Make `isActive` the only property that can be set through mass assignment operations like `updateAll()`.
config() {
	accessibleProperties("isActive");
}