Show combo data when loading the page for the first time

Good afternoon.
I made a combo which shows the respective data of an option, but this is only loaded when navigating in the other options and returning to the first option.

I need help to show the combo data when the page is reloaded for the first time without having to click on the other options.

For your help, thanks.

Attached code.

Combo Code
$cat = ArrayHelper::map(Category::find()->all(), ‘id’, ‘name_category’);
echo $form->field($model, ‘category_id’)->dropDownList(
‘prompt’=>‘All the products’,


    if (isset($produc) && count($produc) > 0)
        foreach ($produc as $products)

      <td><center><?php echo $products->name_product ?></center></td>
      <td><center><?php echo $products->description ?></center></td>
      <td><center><?php echo $products->price ?></center></td>
    <?php  }}

        foreach ($pt as $produ)

      <td><center><?php echo $produ->name_product ?></center></td>
      <td><center><?php echo $produ->description ?></center></td>
      <td><center><?php echo $produ->price ?></center></td>
    <?php  }}
Name Description Price
<?php ActiveForm::end(); ?>

Combo function
public function actionCategoryProduct()
$model = new Product();

    if ($model->load(Yii::$app->request->post()) && empty($model->category_id)) {

    $pt = Product::findBySql("SELECT * FROM product")->all();

    return $this->render('category-product', ['model' => $model, 'pt' => $pt]);

}elseif ($model->load(Yii::$app->request->post()) ) {

    $produc = Product::findBySql("SELECT * FROM product WHERE category_id = ".$model->categoria_id."")

        return $this->render('category-product', ['model' => $model, 'produc' => $produc]);
return $this->render('category-product', ['model' => $model]);