Skip to content

Commit df139cd

Browse files
committed
Fix #14
1 parent a48c5b6 commit df139cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/steps/step-001.3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ foreach (Star::find()->all() as $star){
9797
$stars[$star->id] = $star->name;
9898
}
9999

100-
echo $form->field($model, 'planet')->dropDownList(
100+
echo $form->field($model, 'star_id')->dropDownList(
101101
$stars,
102102
['prompt' => 'Выберите звезду'] // текст, который отображается в качестве первого варианта
103103
);
@@ -112,7 +112,7 @@ use yii\helpers\ArrayHelper;
112112
use common\models\Star;
113113

114114
$stars = ArrayHelper::map(Star::find()->all(), 'id', 'name');
115-
echo $form->field($model, 'planet')->dropDownList($stars, ['prompt' => 'Выберите звезду']);
115+
echo $form->field($model, 'star_id')->dropDownList($stars, ['prompt' => 'Выберите звезду']);
116116
```
117117

118118
Конечно, вы можете обойтись без переменной `$stars`, записав этот код одну строку. Ну и после всего, для этой формы

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy