Skip to content

Commit 2a4818d

Browse files
k-msalehipaulbalandan
authored andcommitted
Update Model.php
add setAllowedFields method
1 parent 2583f57 commit 2a4818d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

system/Model.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,19 @@ public function errors(bool $forceDB = false)
15781578

15791579
return $error['message'] ?? null;
15801580
}
1581+
1582+
/**
1583+
* Allows to set allowed fields.
1584+
* It could be used when you have to change default or override current allowed fields.
1585+
*
1586+
* @param array $allowedFields
1587+
*
1588+
* @return void
1589+
*/
1590+
public function setAllowedFields(array $allowedFields)
1591+
{
1592+
$this->$allowedFields = $allowedFields;
1593+
}
15811594

15821595
//--------------------------------------------------------------------
15831596
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)