I Have table with multiple primary key. I already put primary key function in my model like this.
class Block extends \yii\db\ActiveRecord
...
public static function primaryKey()
{
return [
'province_id',
'city_id',
'area_id',
'block_id',
];
}
This is my form for search of ListView
<?php echo $form->field($model, 'block_id')->dropDownList(ArrayHelper::map(Block::find()->all(), 'block_id','name'), ['prompt'=>'Choose Block'])->label(false);?>
I can't get all block for my search form. How should I change 'block_id' to get all of my block in dropdownlist?
Thanks in advance...