When running the code:
return $this->render('update', [
'model' => $model,
'stok' => $stok
]);
I get an error related to undefined variable:
PHP Notice 'yii\base\ErrorException' with message 'Undefined variable: stok'
My form is as follows:
<div class="col-sm-2">
<?= $form->field($stok, 'harga_jual1')->textInput(['id' => 'hargaRetail'])->label('Harga Retail') ?>
</div>
How can I resolve this error?
_form.phprendered. add'stok' => $stokthere also.