can yii2 store an array in postgres' integer[] type field?

Good day

I have two doubts

Can yii2 store an array in postgres’ integer[] type field?

and if possible

How can i do it?

Absolutely, just make certain that in your rules, you don’t have integar validation enabled for this field.

public function getCheckboxOptions()
  return [
    1 => 'Option 1',
    2 => 'Option 2,

<?= $form->field($model, 'my_checkbox')->checkboxList($model->checkboxOptions) ?>