I have a dropdown list in my yii2 application which fetches data from database table. now i want to add an extra options to my dropdownlist with value=1 and display=admin
my current dropdown list is :
<?= Html::dropDownLIst('assign_to', null,
ArrayHelper::map(PhCrmUser::findAll(['user_type' => 'executive_manager', 'status' => CrmUser::STATUS_ACTIVE]), 'id',
function($model, $defaultValue) {
return $model['first_name']." ".$model['last_name'];
}
),
['class' => 'form-control', 'prompt' => 'Assign to Manager']
)?>
it displays output as
<select class="form-control" name="assign_to">
<option value="">Assign to Manager</option>
<option value="8">Matt Demon</option>
<option value="10">Vinit Singh</option>
<option value="14">dsfds sdfsdf</option>
</select>
now i want to add and extra static option to my dropdownlist how to achive it in yii. my output should look like.
<select class="form-control" name="assign_to">
<option value="">Assign to Manager</option>
<option value="1">Admin</option>
<option value="8">Matt Demon</option>
<option value="10">Vinit Singh</option>
<option value="14">dsfds sdfsdf</option>
</select>