How do I get a value and make it appear on a dropDownlist on yii2
For example I have 2 models which is hotel guest and service request. I wanna get the hotelguest_id value from its model and store it on a dropdown on the service request.
Similar like this.
<?= $form->field($model, 'hotelguest_id')>dropDownList(yii\helpers\ArrayHelper::map(hotelguest_id::find(->all(),
'id', 'id')) ?>