Added allowedFields to models

- Without this save(), insert() and update() fail
This commit is contained in:
objecttothis
2023-02-25 23:24:07 +04:00
committed by Steve Ireland
parent 7738242386
commit 6126483586
27 changed files with 292 additions and 40 deletions

View File

@@ -10,6 +10,12 @@ use CodeIgniter\Model;
*/
class Module extends Model
{
protected $allowedFields = [
'name_lang_key',
'desc_lang_key',
'sort'
];
public function get_module_name(string $module_id): string
{
$builder = $this->db->table('modules');
@@ -128,4 +134,4 @@ class Module extends Model
return $builder->get()->getRow()->sort;
}
}
}