How to display first name and last name in drop down list in yii2

I have Employee model, controller and view. Employee table contains FirstName, MiddleName, LastName, etc.

Now I wanted to display Employee FirstName and LastName together in yii2 dropdown list. How to do that?

The following code only displays Employee First Name:

<?=$form->field($model, ‘EmpId’)->dropDownList(ArrayHelper::map(Employee::find()->all(),‘EmpId’,‘FirstName’), [‘prompt’ => ‘Select Employee’])?>

You could add a "getFullname" property to your Employee model and use that in ::map.